• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Object

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Iam new to java, so i have one more requirement where i need to display the user information that is stored in a session object in the previous page in this page ,

how can i do it.please help me.

Thanks
krish
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More information please.
Every basic JSP book or example shows how to do this basic operation.

Where are you stuck? What have you done so far?
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Krish,
You might want to read more about Session Objects in Java-Servlet, as they store the information on the session basis and not on the per-page basis.

HttpSession

Regards,
VaruNarang.
[ October 18, 2007: Message edited by: Varun Narang ]
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Krish,

You already stored your previous page values in session object. so, in your current jsp page, you write like (I am giving you a sample code)


So, whatever the data type is, you can code like this, but don't forget to type cast your session Object value to your required data type.

[BPSouther: Added code tags]
[ October 23, 2007: Message edited by: Ben Souther ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic