Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

in struts2 how can I use session variables

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in struts2 how can I use session variables
 
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi reddy,

you can use
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
If I want to use in jsp page how can I use it.. while editing a page need to display before entered values in that session. pLease provide me a sample in strtus 2.
Thanks,
Arpitha.
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Arpitha,

I didn't understand what you are looking for, here are some link,
http://struts.apache.org/2.0.14/docs/simplelogin-with-session.html
do not use scriplets in your jsp page. To retrieve context, application, session, request scope object use the following url
http://struts.apache.org/2.0.8/docs/jsp.html

hope you find these useful.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here you set value in session ...its ok.

now get value in jsp...
getAttribute("string");

ok.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic