Date: 2004-07-20T08:04:19
Editor: JamesChilders <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]