incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1031493 - /incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java
Date Fri, 05 Nov 2010 09:35:47 GMT
Author: danhaywood
Date: Fri Nov  5 09:35:47 2010
New Revision: 1031493

URL: http://svn.apache.org/viewvc?rev=1031493&view=rev
Log:
reformatted DispatcherServlet as minor side-effect of tracking down a bug (no functional change)

Modified:
    incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java?rev=1031493&r1=1031492&r2=1031493&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/webapp/servlet/DispatcherServlet.java
Fri Nov  5 09:35:47 2010
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.webapp.servlet;
 
 import java.io.IOException;
@@ -29,31 +28,33 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.runtime.context.IsisContext;
 import org.apache.isis.webapp.Dispatcher;
 import org.apache.isis.webapp.UserManager;
-
+import org.apache.log4j.Logger;
 
 public class DispatcherServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
     private static final Logger LOG = Logger.getLogger(DispatcherServlet.class);
     private Dispatcher dispatcher;
 
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException,
+        IOException {
         LOG.info("POST " + request.getServletPath() + "  " + request.getQueryString());
         process(request, response);
     }
 
+    @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
         LOG.info("GET  " + request.getServletPath() + "  " + request.getQueryString());
         process(request, response);
     }
 
     private void process(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
-    	// TODO: NOF's AuthenticationSession now has its own #getAttribute() and #setAttribute()
methods,
-    	// so an alternative is to bind this info onto the AuthSession.
-    	// The core/webapp will (hopefully) evolve to define a standard approach here...
+        // TODO: NOF's AuthenticationSession now has its own #getAttribute() and #setAttribute()
methods,
+        // so an alternative is to bind this info onto the AuthSession.
+        // The core/webapp will (hopefully) evolve to define a standard approach here...
         try {
             HttpSession httpSession = request.getSession(true);
             ServletRequestContext context = (ServletRequestContext) httpSession.getAttribute("scimpi-context");
@@ -61,15 +62,16 @@ public class DispatcherServlet extends H
                 context = new ServletRequestContext();
                 httpSession.setAttribute("scimpi-context", context);
             }
-                context.startRequest(request, response, getServletContext());
-                dispatcher.process(context, request.getServletPath());
+            context.startRequest(request, response, getServletContext());
+            dispatcher.process(context, request.getServletPath());
         } catch (RuntimeException e) {
             LOG.error("servlet exception", e);
             throw e;
         }
-            
+
     }
 
+    @Override
     public void init() throws ServletException {
         super.init();
 
@@ -85,8 +87,7 @@ public class DispatcherServlet extends H
         }
         String dir = getServletContext().getRealPath("/WEB-INF");
         dispatcher.init(dir);
-        
+
         new UserManager(IsisContext.getAuthenticationManager());
     }
 }
-



Mime
View raw message