221 |
Conversational State |
241 |
The HttpSession interface |
261 |
Listener examples: Attribute class (listening for events that affect IT) |
222 |
Objectives |
242 |
Key HttpSession methods |
262 |
Session-related Listeners |
223 |
Kim wants to keep client-specific state across multiple requests |
243 |
Setting session timeout |
263 |
Session-related Event Listeners and Event Objects API overview |
224 |
It's supposed to work like a REAL conversation... |
244 |
Code Magnets (DD and Servlet timeouts) |
264 |
Session-related Listeners |
225 |
How can he track the client's answers? |
245 |
Be the container |
265 |
Coffee Cram Q1,Q2 |
226 |
How sessions work |
246 |
Code Magnet Answers (to p. 244) |
266 |
Coffee Cram Q3,Q4,Q5 |
227 |
(continued from p. 226) |
247 |
Be the container answers (to p. 245) |
267 |
Coffee Cram Q6,Q7 |
228 |
One problem...how does the Container know who the client is? |
248 |
Can I use cookies for other things, or are they only for sessions? |
268 |
Coffee Cram Q8,Q9,Q10 |
229 |
The client needs a unique session ID |
249 |
Using Cookies with the Servlet API |
269 |
Coffee Cram Q11,Q12,Q13 |
230 |
How do the Client and Container exchange Session ID info? |
250 |
Simple custom cookie example |
270 |
Coffee Cram Q14 |
231 |
The best part: the Container does virtually all the cookie work! |
251 |
Custom cookie example continued... |
271 |
Coffee Cram Q15 |
232 |
What if I want to know whether the session already existed or was just created? |
252 |
Key milestones for an HttpSession |
272 |
Coffee Cram Answers Q1,Q2 |
233 |
What if I want ONLY a pre-existing session? |
253 |
Session lifecycle Events |
273 |
Coffee Cram Answers Q3,Q4,Q5 |
234 |
You can do sessions even if the client doesn't accept cookies, but you have to do a little more work... |
254 |
Don't forget about HttpSessionBindingListener |
274 |
Coffee Cram Answers Q6,Q7 |
235 |
URL rewriting: something to fall back on |
255 |
Session migration |
275 |
Coffee Cram Answers Q8,Q9,Q10 |
236 |
URL rewriting kicks in ONLY if cookies fail, and ONLY if you can tell the response to encode the URL |
256 |
Session migration in action |
276 |
Coffee Cram Answers Q11,Q12,Q13 |
237 |
URL rewriting works with sendRedirect() |
257 |
(continued from p. 256) |
277 |
Coffee Cram Answers Q14 |
238 |
Don't by fooled by a request parameter "jsessionid" or "JSESSIONID" header. |
258 |
HttpSessionActivationListener lets attributes prepare for the big move |
278 |
Coffee Cram Answers Q15 |
239 |
Getting rid of sessions |
259 |
Listener examples: Session counter |
|
|
240 |
How we want it to work... |
260 |
Listener examples: Attribute Listener |
|
|