cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r615889 - in /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src: changes/changes.xml main/java/org/apache/cocoon/servletservice/DispatcherServlet.java
Date Mon, 28 Jan 2008 14:17:29 GMT
Author: gkossakowski
Date: Mon Jan 28 06:17:28 2008
New Revision: 615889

URL: http://svn.apache.org/viewvc?rev=615889&view=rev
Log:
<action dev="gkossakowski" type="fix">
  DispatcherServlet does not throw an exception if it fails to find suitable servlet for processing
incomming request.
  It returns 404 error and puts information to log about the failure, instead.
</action>

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/DispatcherServlet.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml?rev=615889&r1=615888&r2=615889&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/changes/changes.xml
Mon Jan 28 06:17:28 2008
@@ -50,6 +50,10 @@
       <action dev="gkossakowski" type="add" issue="COCOON-2036" due-to="Alexander Klimetschek"
due-to-email="alexander.klimetschek@googlemail.com">
         Throw an exception when circular dependencies in servlet connections are detected.
       </action>
+      <action dev="gkossakowski" type="fix">
+      	DispatcherServlet does not throw an exception if it fails to find suitable servlet
for processing incomming request. 
+      	It returns 404 error and puts information to log about the failure, instead.
+      </action>
     </release>
   </body>
 </document>

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/DispatcherServlet.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/DispatcherServlet.java?rev=615889&r1=615888&r2=615889&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/DispatcherServlet.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/DispatcherServlet.java
Mon Jan 28 06:17:28 2008
@@ -82,7 +82,10 @@
         //case when servlet is mounted at "/" must be handled separately
         servlet = servlet == null ? (Servlet) mountableServlets.get("/") : servlet;
         if (servlet == null) {
-            throw new ServletException("No block for " + req.getPathInfo());
+        	String message = "No block for " + req.getPathInfo();
+        	res.sendError(HttpServletResponse.SC_NOT_FOUND, message);
+        	this.logger.info(message);
+            return;
         }
 
         // Create a dynamic proxy class that overwrites the getServletPath and



Mime
View raw message