You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by de...@struts.apache.org on 2004/07/20 17:04:20 UTC

[Apache Struts Wiki] Updated: RequestProcessor

   Date: 2004-07-20T08:04:19
   Editor: JamesChilders <jc...@hotels.com>
   Wiki: Apache Struts Wiki
   Page: RequestProcessor
   URL: http://wiki.apache.org/struts/RequestProcessor

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -1,3 +1,27 @@
+Package: org.apache.struts.action
+
+RequestProcessor contains the processing logic that the Struts controller servlet performs as it receives each servlet request from the container.  You can customize the request processing behavior by subclassing this class and overriding the method(s) whose behavior you are interested in changing.
+
+A simple example of a custom RequestProcessor is:
+
+{{{
+package com.yourco.action;
+
+public class WebcoreRequestProcessor extends RequestProcessor {
+        System.out.println(" Before processForwardConfig method.");
+}
+}}}
+
+Which would be defined in StrutsConfigXml thus:
+
+{{{
+<controller processorClass="com.yourco.action.YourCoRequestProcessor" />
+}}}
+
+See the [http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd struts-config.xml DTD] for the complete list of attributes accepted by the controller element.
+
+----
+
 Has anyone considered a mechanism to make a composite RequestProcessor?  It seems like the biggest obstacle is the struts-config DTD.  I think you could get there by extending ControllerConfig and setting properties on it, and making sure that your ControllerConfig and your RequestProcessor could see each other.
 ----
 This would be an awesome feature. Currently we are looking to incorporate three different RequestProcessors (TilesRequestProcessor,BC4JRequestProcessor,WorkflowRequestProcessor) and the only solution is to take all the sources and modify them into one RequestProcessor. It would be great if I could add them all together without modifying the third-party source code.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org