activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r908476 - in /activemq/trunk: activemq-fileserver/ activemq-fileserver/src/main/java/org/apache/activemq/util/ activemq-fileserver/src/main/webapp/WEB-INF/ assembly/src/release/conf/
Date Wed, 10 Feb 2010 12:51:41 GMT
Author: dejanb
Date: Wed Feb 10 12:51:40 2010
New Revision: 908476

URL: http://svn.apache.org/viewvc?rev=908476&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2600 - jetty 7 - fileserver app fixed

Modified:
    activemq/trunk/activemq-fileserver/pom.xml
    activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
    activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
    activemq/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml
    activemq/trunk/assembly/src/release/conf/jetty.xml

Modified: activemq/trunk/activemq-fileserver/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-fileserver/pom.xml?rev=908476&r1=908475&r2=908476&view=diff
==============================================================================
--- activemq/trunk/activemq-fileserver/pom.xml (original)
+++ activemq/trunk/activemq-fileserver/pom.xml Wed Feb 10 12:51:40 2010
@@ -38,7 +38,7 @@
         <version>${jetty-version}</version>
         <configuration>
           <connectors>
-            <connector implementation="org.eclipse.jetty.nio.SelectChannelConnector">
+            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
               <port>${jetty.port}</port>
               <maxIdleTime>60000</maxIdleTime>
             </connector>

Modified: activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java?rev=908476&r1=908475&r2=908476&view=diff
==============================================================================
--- activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
(original)
+++ activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/FilenameGuardFilter.java
Wed Feb 10 12:51:40 2010
@@ -27,10 +27,14 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
 
-import org.eclipse.jetty.util.log.Log;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 
 public class FilenameGuardFilter implements Filter {
 
+    private static final Log LOG = LogFactory.getLog(FilenameGuardFilter.class);
+    
     public void destroy() {
         // nothing to destroy
     }
@@ -57,8 +61,8 @@
 
         private String guard(String filename) {
             String guarded = filename.replace(":", "_");
-            if (Log.isDebugEnabled()) {
-                Log.debug("guarded " + filename + " to " + guarded);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("guarded " + filename + " to " + guarded);
             }
             return guarded;
         }

Modified: activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java?rev=908476&r1=908475&r2=908476&view=diff
==============================================================================
--- activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
(original)
+++ activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
Wed Feb 10 12:51:40 2010
@@ -36,9 +36,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.eclipse.jetty.util.IO;
 import org.eclipse.jetty.util.URIUtil;
-import org.eclipse.jetty.util.log.Log;
+
 
 /**
  * <p>
@@ -50,6 +52,7 @@
  * @author Aleksi Kallio
  */
 public class RestFilter implements Filter {
+    private static final Log LOG = LogFactory.getLog(RestFilter.class);
 
     private static final String HTTP_HEADER_DESTINATION = "Destination";
     private static final String HTTP_METHOD_MOVE = "MOVE";
@@ -73,8 +76,8 @@
 
     public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
         if (!(request instanceof HttpServletRequest && response instanceof HttpServletResponse))
{
-            if (Log.isDebugEnabled()) {
-                Log.debug("request not HTTP, can not understand: " + request.toString());
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("request not HTTP, can not understand: " + request.toString());
             }
             chain.doFilter(request, response);
             return;
@@ -100,8 +103,8 @@
     }
 
     protected void doMove(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
-        if (Log.isDebugEnabled()) {
-            Log.debug("RESTful file access: MOVE request for " + request.getRequestURI());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("RESTful file access: MOVE request for " + request.getRequestURI());
         }
 
         if (writePermissionRole != null && !request.isUserInRole(writePermissionRole))
{
@@ -135,8 +138,8 @@
     }
 
     protected boolean checkGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
-        if (Log.isDebugEnabled()) {
-            Log.debug("RESTful file access: GET request for " + request.getRequestURI());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("RESTful file access: GET request for " + request.getRequestURI());
         }
 
         if (readPermissionRole != null && !request.isUserInRole(readPermissionRole))
{
@@ -148,8 +151,8 @@
     }
 
     protected void doPut(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
-        if (Log.isDebugEnabled()) {
-            Log.debug("RESTful file access: PUT request for " + request.getRequestURI());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("RESTful file access: PUT request for " + request.getRequestURI());
         }
 
         if (writePermissionRole != null && !request.isUserInRole(writePermissionRole))
{
@@ -177,7 +180,7 @@
         try {
             IO.copy(request.getInputStream(), out);
         } catch (IOException e) {
-            Log.warn(Log.EXCEPTION, e); // is this obsolete?
+            LOG.warn("Exception occured" , e);
             out.close();
             throw e;
         }
@@ -187,8 +190,8 @@
     }
 
     protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
-        if (Log.isDebugEnabled()) {
-            Log.debug("RESTful file access: DELETE request for " + request.getRequestURI());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("RESTful file access: DELETE request for " + request.getRequestURI());
         }
 
         if (writePermissionRole != null && !request.isUserInRole(writePermissionRole))
{

Modified: activemq/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml?rev=908476&r1=908475&r2=908476&view=diff
==============================================================================
--- activemq/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml (original)
+++ activemq/trunk/activemq-fileserver/src/main/webapp/WEB-INF/web.xml Wed Feb 10 12:51:40
2010
@@ -25,7 +25,7 @@
 
   <servlet>
     <servlet-name>DefaultServlet</servlet-name>
-    <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
+    <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
   </servlet>
 
   <servlet-mapping>

Modified: activemq/trunk/assembly/src/release/conf/jetty.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/jetty.xml?rev=908476&r1=908475&r2=908476&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/jetty.xml (original)
+++ activemq/trunk/assembly/src/release/conf/jetty.xml Wed Feb 10 12:51:40 2010
@@ -58,13 +58,11 @@
               <property name="resourceBase" value="${activemq.base}/webapps/demo"/>
               <property name="logUrlOnStart" value="true"/>
             </bean>
-            <!--
             <bean class="org.eclipse.jetty.webapp.WebAppContext">
               <property name="contextPath" value="/fileserver"/>
               <property name="resourceBase" value="${activemq.base}/webapps/fileserver"/>
               <property name="logUrlOnStart" value="true"/>
             </bean>
-            -->
             <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
           </list>
         </property>



Mime
View raw message