• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Create session Map Object using Interceptor

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am Stuck in Map Session Object in my application. I want to after login successful create a session and put AdminLogin object to the session Map. I use Interceptor interface to do in that @Override intercept
method. But how to retrieve that session Map Object in my class.

If any idea please tell..

Thank you.
 
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
request.getSession() will provide the session object.
Can you share the code you are currently using to put the admin object?

But how to retrieve that session Map Object in my class.


In which layer does this class reside? Does it have access to HttpServletRequest or HttpSession?
 
suraj savaratkar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is code..

its works correct but how to iterate in jsp using OGNL tags. of DOJO tags.

Please Help.






 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to get it on your jsp, you can use,


If you want to iterate through all the items in then you need to use "<s:iterator>" tags.
 
suraj savaratkar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can you explain code how to iterate through <s:iterate>.
because i am confusing to use of % and # . Is this essential to use ?? to iterate the session object. And if session contains SessionMap Object then for which tag should i use to complete this task???

Thank you..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!