• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSP request.getParameter

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" ) %>
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic