Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent -- Struts FrameWork - finding the page in ActionForward

 
Pratibha Srinivasan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic