struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Gokey <cgo...@sesda2.com>
Subject Struts1 RequestProcessor
Date Tue, 01 Jul 2014 21:08:51 GMT
We've got some pretty old code that I'm trying to port over to Struts2 and
if someone could point me in the right direction in how I can rewrite this
 code that we subclassed in Struts1's RequestProcessor to handle the same
type of thing in Struts2, I'd really appreciate it.

Basically:

1) In Struts1, we implements a custom RequestProcessor, that overrides:

public class CustomRequestProcessor extends RequestProcessor
   protected void processForwardConfig(HttpServletRequest request,
                                        HttpServletResponse response,
                                        ForwardConfig forward) throws
            IOException, ServletException

2) In the method above, it grabs the path:

        String path = forward.getPath();

3) If the path is a .jsp file, it does things special and rewrites where
the JSP file is located.
    Then calls:

     newPath = determineNewPath(path);
     doForward(newPath, request, response);

I thought about overwriting StrutsPrepareAndExecuteFilter, but it isn't
obvious how I can grab the path and rewrite it, so any suggestions/help
would be greatly apprecicated.   Is this something that an Interceptor
would be best in handling?

Thanks,
Chris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message