• 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

Actually wht is a session????

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m tryin to create a new session which a brand new SEARCH every time a user clicks;
damn
i m lost i cud not make it;
and when i print the session ID;
it always gives me the same session id;
help me!!!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not what sessions are for. Sessions are explicitly persistant in that way so that you can maintain state between HTTP requests -- HTTP being a stateless protocol.
What you can do is to create a bean or other class that encapsulates the search data you want to store and stick that on the session as an attribute. You can then change this attriibute as often as you like.
hth,
bear
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure what your asking, but if you want a new session you could always invalidate the old by calling invalidate() on the session object. Then create a new session by request.getSession(true)
 
reply
    Bookmark Topic Watch Topic
  • New Topic