aspose file tools*
The moose likes JSP and the fly likes How to forward the parameters from one page to another jsp page ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to forward the parameters from one page to another jsp page ?" Watch "How to forward the parameters from one page to another jsp page ?" New topic
Author

How to forward the parameters from one page to another jsp page ?

subbu grandhi
Greenhorn

Joined: Jun 11, 2013
Posts: 22
Am New to jsp I had to forward the name from one file to another,I am getting that name from textField (name represents another JSP file name). After a lot of dig I found the below code to be worked but it wasn't work. I have three jsp files like oneMain.jsp, twoMain.jsp and threeMain.jsp. I forward the name threeMain from oneMain.jsp to twoMain.jsp. So that I can display the content of the threeMain.jsp page

oneMain.jsp code is

twoMain.jsp code is

Finally I want threeMain.jsp content to be displayed.
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 485

the parameter "visualName" is not put into the request object, it is put into the param object instead. You can access this variable in your twoMain.jsp using EL code like this:



PM Me If You Want to get Urgent Help on Java Programming
subbu grandhi
Greenhorn

Joined: Jun 11, 2013
Posts: 22
@Nam Ha Minh Thanks for your answer,but I am getting error in oneMain.jsp .

can you tell me one thing , did you tried with 3 .jsp files ,is it working fine .

why I am asking,I am getting error in oneMain.jsp.

Thanks Nam
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 485

I found something wrong in your code.

This is missing double quotes and equal sign after the <%:



It should be:



Check others for the same error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to forward the parameters from one page to another jsp page ?
 
Similar Threads
Error passing data from jsp to servlet
A multi-step wizard form with multiple &lt;ui:include&gt;s
unable to get form Parameters
How to store the data entered by user in a form into a database using struts
JSP form Not working