File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Servlets-5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Servlets-5" Watch "Servlets-5" New topic


Michael Matola
Ranch Hand

Joined: Mar 25, 2001
Posts: 1793
I'm confused over the details of session management for Servlets-5. Maybe I'm making things more complicated than they need to be?
If I'm to rely on the built-in session management API, then it's my understanding that I need to associate some object, say a video list, as an attribute of the session object I can get from the request object. And I need to retrieve this associated object each time it gets used in a standard doXXX servlet method.
Or am I way off in the wrong direction?
(If the above is correct, then the way Servlets-5 goes about sharing the video list is different from both how the instructor's solution shares the video list in Servlets 4a-b and the other common way to go about sharing the video list. Right?)
Or should I just torture Marilyn by submitting what I have written up right now?
Carol Murphy
village idiot

Joined: Mar 15, 2001
Posts: 1202
I am embarrassed to admit that I don't understand what you are even asking about! My advice to you is to submit what you have, and let Marilyn go nuts on it!
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
The video list is shared exactly the same way as it is in Servlets-4b

Making sure the user has a valid session is different.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Michael Matola
Ranch Hand

Joined: Mar 25, 2001
Posts: 1793
I think I've got it all straight now. (Guess it depends on how we interpret "same" and "different"!)
My first pass at this assignment produced some pretty ugly code. Was looking for a strategy check to help decide whether to clean up my existing version or to rethink my whole approach. Took a couple more passes and cleaned it up quite nicely, then submitted.
Carol -- as far as not understanding me, don't worry. Some of my posts to the Cattle Drive forum rank pretty high on the cryptic scale. I was trying to ask a fairly detailed question without giving away too much. (But, hey -- you've passed this assignment already!)
I agree. Here's the link:
subject: Servlets-5
It's not a secret anymore!