In my Action subclass, rather than returning the results of mapping.findForward(...) I need to forward to a page determined at runtime. What is the *proper* way to forward to xxx.jsp? Should I construct an ActionForward? (tried that unsuccessfully).

Ted Husted

You can create a new ActionForward dynamically:

String path = ... create context-relative path to new page ...
return (new ActionForward(path));

The path you calculate must be context relative and start with a slash, exactly like the "path" attributes to your standard <forward> elements.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact