Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java (revision 2653)
+++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java (revision 2654)
@@ -28,4 +28,7 @@
import javax.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import net.fckeditor.requestcycle.ThreadLocalData;
@@ -34,18 +37,24 @@
*
* - Initialization of the {@link Dispatcher} object.
- * - Calling {@link ThreadLocalData#beginRequest(HttpServletRequest)}
- * (It is an object that holds request-based objects.)
+ * - Calling {@link ThreadLocalData#beginRequest(HttpServletRequest)} (It is
+ * an object that holds request-based objects.)
* - Forwarding the requests:
- *
GET
to {@link Dispatcher#doGet(HttpServletRequest, HttpServletResponse)}
- * POST
to {@link Dispatcher#doPost(HttpServletRequest, HttpServletResponse)}.
- *
+ *
+ * GET
to
+ * {@link Dispatcher#doGet(HttpServletRequest, HttpServletResponse)}
+ * POST
to
+ * {@link Dispatcher#doPost(HttpServletRequest, HttpServletResponse)}.
+ *
+ *
* - Calling {@link ThreadLocalData#endRequest()} to cleanup all ThreadLocal
* objects independent of if an exception was thrown or not. That's very
* important to prevent memory-leaks!!!
- *
+ *
+ *
* Summing up: This workflow guarantees the correct initialization and cleaning
- * of the {@link ThreadLocalData}, - it's essential because of preventing memory-leaks.
- * All requests are dispatched to the {@link Dispatcher}. The {@link Dispatcher}
- * forwards the request to an implementation of the {@link Connector}.
+ * of the {@link ThreadLocalData}, - it's essential because of preventing
+ * memory-leaks. All requests are dispatched to the {@link Dispatcher}. The
+ * {@link Dispatcher} forwards the request to an implementation of the
+ * {@link Connector}.
*
* @version $Id$
@@ -53,6 +62,8 @@
public class ConnectorServlet extends HttpServlet {
private static final long serialVersionUID = -5742008970929377161L;
+ private final Logger logger = LoggerFactory
+ .getLogger(ConnectorServlet.class);
private Dispatcher dispatcher;
-
+
/**
* Initializes the {@link Dispatcher}.
@@ -65,14 +76,20 @@
dispatcher = new Dispatcher(getServletContext());
} catch (Exception e) {
+ logger.error("Dispatcher could not be initialized", e);
throw new ServletException(e);
}
}
-
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest
+ * , javax.servlet.http.HttpServletResponse)
*/
@Override
- protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
+ protected void doGet(final HttpServletRequest request,
+ final HttpServletResponse response) throws ServletException,
+ IOException {
try {
ThreadLocalData.beginRequest(request);
@@ -87,13 +104,18 @@
} finally {
ThreadLocalData.endRequest();
- }
+ }
}
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest
+ * , javax.servlet.http.HttpServletResponse)
*/
@Override
- protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
- throws ServletException, IOException {
+ protected void doPost(final HttpServletRequest request,
+ final HttpServletResponse response) throws ServletException,
+ IOException {
try {
ThreadLocalData.beginRequest(request);