Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
subbu grandhi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
subbu grandhi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic