sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1067913 - /sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
Date Mon, 07 Feb 2011 11:06:25 GMT
Author: bdelacretaz
Date: Mon Feb  7 11:06:24 2011
New Revision: 1067913

URL: http://svn.apache.org/viewvc?rev=1067913&view=rev
Log:
SLING-1963 - bugfix, /system/sling/junit did not show CSS

Modified:
    sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java

Modified: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java?rev=1067913&r1=1067912&r2=1067913&view=diff
==============================================================================
--- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
(original)
+++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
Mon Feb  7 11:06:24 2011
@@ -116,9 +116,13 @@ public class JUnitServlet extends HttpSe
     @Override
     protected void doGet(HttpServletRequest request, HttpServletResponse response) 
     throws ServletException, IOException {
+        
+        // Redirect to / if called without it, and serve CSS if requested 
         {
             final String pi = request.getPathInfo();
-            if(pi != null && pi.endsWith(CSS)) {
+            if(pi == null) {
+                response.sendRedirect(request.getContextPath() + SERVLET_PATH + "/");
+            } else if(pi.endsWith(CSS)) {
                 sendCss(response);
                 return;
             }



Mime
View raw message