Reading Notes for Chapter 6, Head First Servlets and JSP

Table of Contents

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    

p221 Conversational State

@@@

p222 Objectives

@@@

p223 Kim wants to keep client-specific state across multiple requests

@@@

p224 It's supposed to work like a REAL conversation...

@@@

p225 How can he track the client's answers?

@@@

p226 How sessions work

@@@

p227 (continued from p. 226)

@@@

p228 One problem...how does the Container know who the client is?

@@@

p229 The client needs a unique session ID

@@@

p230 How do the Client and Container exchange Session ID info?

@@@

p231 The best part: the Container does virtually all the cookie work!

@@@

p232 What if I want to know whether the session already existed or was just created?

@@@

p233 What if I want ONLY a pre-existing session?

@@@

p234 You can do sessions even if the client doesn't accept cookies, but you have to do a little more work...

@@@

p235 URL rewriting: something to fall back on

@@@

p236 URL rewriting kicks in ONLY if cookies fail, and ONLY if you can tell the response to encode the URL

@@@

p237 URL rewriting works with sendRedirect()

@@@

p238 Don't by fooled by a request parameter "jsessionid" or "JSESSIONID" header.

Check the unconfirmed errata for this page!

@@@

p239 Getting rid of sessions

@@@

p240 How we want it to work...

@@@

p241 The HttpSession interface

@@@

p242 Key HttpSession methods

@@@

p243 Setting session timeout

@@@

p244 Code Magnets (DD and Servlet timeouts)

@@@

p245 Be the container

@@@

p246 Code Magnet Answers (to p. 244)

@@@

p247 Be the container answers (to p. 245)

@@@

p248 Can I use cookies for other things, or are they only for sessions?

@@@

p249 Using Cookies with the Servlet API

@@@

p250 Simple custom cookie example

@@@

p251 Custom cookie example continued...

@@@

p252 Key milestones for an HttpSession

@@@

p253 Session lifecycle Events

@@@

p254 Don't forget about HttpSessionBindingListener

@@@

p255 Session migration

@@@

p256 Session migration in action

@@@

p257 (continued from p. 256)

@@@

p258 HttpSessionActivationListener lets attributes prepare for the big move

@@@

p259 Listener examples: Session counter

@@@

p260 Listener examples: Attribute Listener

@@@

p261 Listener examples: Attribute class (listening for events that affect IT)

@@@

p262 Session-related Listeners

@@@

p263 Session-related Event Listeners and Event Objects API overview

@@@

p264 Session-related Listeners

@@@

p265 Coffee Cram Q1,Q2

@@@

p266 Coffee Cram Q3,Q4,Q5

@@@

p267 Coffee Cram Q6,Q7

@@@

p268 Coffee Cram Q8,Q9,Q10

@@@

p269 Coffee Cram Q11,Q12,Q13

@@@

p270 Coffee Cram Q14

@@@

p271 Coffee Cram Q15

@@@

p272 Coffee Cram Answers Q1,Q2

@@@

p273 Coffee Cram Answers Q3,Q4,Q5

@@@

p274 Coffee Cram Answers Q6,Q7

@@@

p275 Coffee Cram Answers Q8,Q9,Q10

@@@

p276 Coffee Cram Answers Q11,Q12,Q13

@@@

p277 Coffee Cram Answers Q14

@@@

p278 Coffee Cram Answers Q15

@@@

 


End of CISC474 reading notes for HFSJ, Chapter 6


Valid XHTML 1.1 Valid CSS!