Hi again, I posted this yesterday but got no reply, so here it is again - can anyone help?
Thanks Alan Alan Mullane 04/12/2005 10:30 AM To: user@struts.apache.org cc: Subject: ActionForward not working in Struts/Filters/XSLT application Hi, I am working on the development a Struts application that reads all user requests into a number of Struts Actions and uses XSLT to output the response of all pages as HTML. Also, all requests pass through one or more Servlet Filters before entering the Actions, to handle security, logging, etc. The application only uses actions for processing input requests and doesn't use any additional web pages such as static JSPs or html pages. The output presentation data is dynamically generated by java objects, then written by the Action to the HttpServletResponse and then transformed into HTML using an XSLT transformer. The application doesn't use ActionForward but instead the response is always written to the HttpServletResponse and a null ActionForward is returned by the calling action. In some parts of the application I need to re-route the request to another page (for example, to a logout page if the user session expires). I have tried to use the ActionForward for this case, by calling 'mapping.findForward("logout") but it doesn't work and I always get a blank page - I defined action forwards in the action mappings in the struts-config.xml file but it seems that Struts doesn't allow forwarding to other actions in this type of application (Struts/Filters to XSLT). For now I am using HttpServletResponse.sendRedirect("logout.do") to get around this problem, but it is messy as I need to catch IOException and also lose any parameters within the request - I would prefer to use the Struts framework for this as it is much cleaner and parameters already in the request can be reused. Any ideas on how to fix this? Thanks Alan