You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2011/02/07 12:06:25 UTC
svn commit: r1067913 -
/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java
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;
}