struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1126877 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
Date Tue, 24 May 2011 05:49:02 GMT
Author: lukaszlenart
Date: Tue May 24 05:49:01 2011
New Revision: 1126877

URL: http://svn.apache.org/viewvc?rev=1126877&view=rev
Log:
WW-3601 - switches to /struts/ and /static/ patterns instead of /struts and /static to handle
static content

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java?rev=1126877&r1=1126876&r2=1126877&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java
Tue May 24 05:49:01 2011
@@ -20,6 +20,16 @@
  */
 package org.apache.struts2.dispatcher;
 
+import com.opensymphony.xwork2.inject.Inject;
+import com.opensymphony.xwork2.util.ClassLoaderUtil;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.dispatcher.ng.HostConfig;
+import org.apache.struts2.util.ClassLoaderUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -31,18 +41,6 @@ import java.util.Calendar;
 import java.util.List;
 import java.util.StringTokenizer;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.StrutsConstants;
-import org.apache.struts2.dispatcher.ng.HostConfig;
-import org.apache.struts2.util.ClassLoaderUtils;
-
-import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
-
 public class DefaultStaticContentLoader implements StaticContentLoader {
     /**
      * Provide a logging instance.
@@ -342,7 +340,7 @@ public class DefaultStaticContentLoader 
     }
 
     public boolean canHandle(String resourcePath) {
-        return serveStatic && (resourcePath.startsWith("/struts") || resourcePath.startsWith("/static"));
+        return serveStatic && (resourcePath.startsWith("/struts/") || resourcePath.startsWith("/static/"));
     }
 
     /**



Mime
View raw message