• 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

need help understanding sessions

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends

please dont crackle up on me about asking this stupid type question.

i probably understand the session scope around a web application but practically doesn't.

so if datas are to bent from servlet to jsp and vice-versa in a web application, then when datas should be stored in session scope?


thanks in advance
[ November 07, 2007: Message edited by: Bear Bibeault ]
 
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
There's no problem asking what you think might be a stupid question, but Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

I have adjusted the subject of this post for you.
 
Bear Bibeault
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
Session scope is best used for data that is specific to a single user that must exist across the lifetime of multiple request-response cycles.
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Mr Bear Bibeault

Is it possible to move array of objects around applet-servlet-applet
communication streams?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nidhi Nagre:
thanks Mr Bear Bibeault

Is it possible to move array of objects around applet-servlet-applet
communication streams?



In the future, it would be better if you asked separate and unrelated questions in a separate thread (and in a more appropriate forum).

Yes it is possible.
A Google search on "Servlet tunneling" and "Java Object Serialization" should get you going in the right direction.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nidhi... you confused about storing session info and the mvc model and how applets in pages and multple pages...

It works like this... when the first request comes in and you have sessions set... if gives the browser a number...
JSessionID = 173746465238238292932398932
A long unique number...

Then after that the browser regardless of the page or applet comms or whatever always send that number back to the server.
So the data is not actually comming from the browser, just the number is.

From that number its able to look up what you stored previously because the data never left the server.

So... if you get send from a servlet and then get it back in a JSP page or the applet, or next page.... the servler can find it from the sessionID.

Thats more or less it... same trick is uses when you logon in one page and then move to other pages... thats how servlet container remembers you log on.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic