Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP request.getParameter  RSS feed

 
bhaveshs shah
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,

I am facing problem at passing variable from one form to another

in my index.jsp
i have login id and password i required this login id on next jsp.

that is have got it. now i required this login id in next jsp that is located in next folder eg(protrack/jsp/T.jsp).

kindly help me how to create session value from index.jp as i tried but it failed

Kindly suggest for me to dispaly login at my third jsp page.
thanking you ,

bhavesh

[ January 17, 2007: Message edited by: Bear Bibeault ]
[ January 17, 2007: Message edited by: bhaveshs shah ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need information to exist for more than the scope of a single request, you can store it in the session.

Alternatively, you can create a hidden element on the 2nd page which can be submitted to the 3rd page.
 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1st page
----------
<INPUT TYPE=TEXT NAME=username SIZE=20>

2nd page
-------------
String name = request.getParameter( "username" );
session.setAttribute( "theName", name );

3rd page
-----------
<%= session.getAttribute( "theName" ) %>
 
vijay kumarg
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Bear edit: Thread hijack removed. Please ask your own questions in your own topic.]
[ January 21, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!