jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Urgent -- Struts FrameWork - finding the page in ActionForward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Urgent -- Struts FrameWork - finding the page in ActionForward" Watch "Urgent -- Struts FrameWork - finding the page in ActionForward" New topic
Author

Urgent -- Struts FrameWork - finding the page in ActionForward

Pratibha Srinivasan
Greenhorn

Joined: Mar 06, 2003
Posts: 6
Hi All,

I am using Struts framework and have a requirement to find the page to which the control is being forwarded ( i.e after the action.execute()). Now, to do this I have a customized request process where the method processActionPerform is being overridden:
protected ActionForward processActionPerform(HttpServletRequest request,
HttpServletResponse response,Action action,ActionForm form, ActionMapping mapping)throws IOException, ServletException {
try {
ActionForward actionForward=action.execute(mapping, form, request, response);
//Call a method of ComponentX
ComponentX.methodY(actionForward);

return actionForward;

} catch (Exception e) {
return (processException(request, response,e, form, mapping));
}
}
==========================================================
The question is -> Is it possible to get the JSP to which control is being forwarded without changing the Request Processor?
Thanks in advance!
Pratibha
Ankur Srivastava
Ranch Hand

Joined: May 11, 2004
Posts: 62
If I have understood your question properly you can use the getPath() method on the ActionForward object to get the URL of the jsp.

---------
Regards
Ankur
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent -- Struts FrameWork - finding the page in ActionForward