posted 21 years ago
I've got a class called CeMORRequestProcessor that extends RequestProcessor, and overrides the init() method so that I can add a ServiceFactory to the context (probably would make more sense to extend ActionServlet instead, but according to what I've read about 1.1, RequestProcessor is the way to go).
I've placed the following controller mapping in struts-config.xml
<controller processorClass="businesstier.CeMORRequestProcessor"/>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
The Tiles stuff was there already.
If I take out the TilesRequestProcessor line, I get an error that the specified RequestProcessor isn't compatible with TilesRequestProcessor. This also happens if I have my processor listed after the tiles one. However, if I put it first, I don't get the incompatible error, but my RequestProcessor never gets initialized (the ServiceFactory is never placed in the context).
I put context.log(...) as the second line in my init method, but it never appears to get called.
Any idea what the heck I am doing wrong. At a loss here, and all the tutorials/books I've read through seem to state that this is all I need to do. However, they never override init, so that could be my problem.
Just trying to initialize my factory and stick it somewhere that all the actions have access to.
Thanks!
Jason