File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling struts action from a jsp page

 
jishnu dasgupta
Ranch Hand
Posts: 103
Eclipse IDE Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the below code in my jsp page,popUpWrapper.jsp:



where request.getParameter(), gets the jsp page which is appended with URL of popUpWrapper.jsp.

For example

if i have the below code:


then abc.jsp, is included inside PopUpWrapper.jsp.

The issue with this, is it works fine, when i pass a jsp page as a parameter.
However in some cases i have to pass a url like

where workspace.do, has a mapping in struts-config.xml, from where it gets redirected to an Action class, which in turn determines, what jsp page to be displayed.

When i pass such URL in my PopUpWrapper.jsp, the jsp:include tries to find page workspace.do, in its namespace, to display, instead of redirecting to Action class from struts config. AS a result, i get the page not found error.

Please advice on how to proceed for such URLS, where the Action class needs to be hit.

Note: i need to put this jsp, inside the PopUpWrapper.jsp. I had tried with requestDispatcher, but that didnt help me include inside PopUpWrapper.jsp.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic