aspose file tools
The moose likes Struts and the fly likes session problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "session problem" Watch "session problem" New topic
Author

session problem

Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
hi

i donot know much about session
i have maintained a session on my login page & i want to use it on other page for changing password


so what should i do for that please help me

thank you
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26193
    
  66

A HttpSession is like a map that is available to you on any page the user visits. This means you can store the user id in the session when he/she logs in and have it available on a later page when the user wants to change the password.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
thank you Jeanne for your reply

but i want to know how i can use it on my later pages in struts
if you have any tutorials for that then please send me the links

thank you one again
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26193
    
  66

Of course. That's how a session works. The Struts specific way is to create a form bean in the session scope. Then your later actions/pages can access it.
Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
thank you again for your reply actually i am now posting my code

my login page



now the page on which i want to change my password



now i want to ask how can i use session on my action page some problem is there when i click on my changepassword.jsp it shows me userloggin page again

so please help me now
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26193
    
  66

For the behavior you describe, "valid" is not present in the session. Where do you set it? In an action? Can you show that code? Can you confirm it is being called? (via a debug statement)
Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
Thank you for your reply

my changepasswordaction code is



Please pardon me if there is any blunder mistake because i am just a fresher for session & i cant understand them completely
Aditi agarwal
Ranch Hand

Joined: Feb 23, 2011
Posts: 225
Please help me guys i need it badly for my project

please help me


 
jQuery in Action, 2nd edition
 
subject: session problem
 
Similar Threads
how to maintain session for jsp page ?
Problems with sessions
Cookies
HTTP and HTTPS
how to access a session value on JSF page?