struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D Ashley Jr." <>
Subject RE: composable RequestProcessor
Date Tue, 03 Jun 2003 17:04:48 GMT
If the TilesRequestProcessor were to be integrated into RequestProcessor,
and made to play nice when not using Tiles, that would at least remove one
obstacle when trying to extend the request processor.  Since Tiles seems to
be a core struts component now, would that make since?  Or should Tiles
still considered an extension?

Otherwise, if the TilesRequestProcessor was kept as a seperate class, and
you follow the composing model David spoke of, would it be desireable for
TilesRequestProcessor to implement this new interface, and then have a
RequestProcessor member?  Or does it stay a subclass of the coreRP?

in tilesRP:
public processXXX() {

public init() {

<snip>What is a RequestProcessor</snip>

public interface ActionServletRequestProcessor {//might one day want
ServletRP, ComposableRP or other including non Http processing?

  void init(ActionServlet servlet,
				ModuleConfig moduleConfig);

  void process(HttpServletRequest request,
                        HttpServletResponse response);

  void destroy();

Wouldn't that be it?  Or am I missing something.  It seems that if you are
going to the trouble of making this an interface, the only things you should
really care about is that you have lifecycle methods, and that you can
process a request and presumable provide a response.  Everything else with
creating Actions, etc may not be desireable in all cases.

Maybe from there you create:

	ActionMappingRP  //or ActionConfigRP

I am with David that this starts to get very complicated.  Maybe instead, a
RPHelper class could be created that has a bunch of static methods to handle
all the default processing rules.  so:

public class RequestProcessor implements ActionServletRequestProcessor {

  public void process(HttpServletRequest request, HttpServletResponse
response) {

    request = RequestHandler.processMultipart(request);
    RequestHandler.processLocale(request, response);
    ActionMapping mapping = RequestHandler.processMapping(request, response,



Gary Ashley

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message