• 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

Create session Map Object using Interceptor

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic