Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Management in HFSJ

 
Sharanya Sharma
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the "Be The Container" Pg 245 the question was asked to check out what happens when each of the servlets are invoked twice by the client. But in the answers the result when it is first accessed is alone given.
I don't see any difference between the first access and the second access to these servlets and they will produce the same result. Please let me know if I am wrong and if the result for the second access is different from the first.

In the question7 on pg267 option C says that session attributes are available to any servlet on the same servletContext. Does that mean servlets in the same servletcontext and part of the same session?


Thx
Sharanya
 
swaminathan doraiswamy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sharanya,
I believe there is no difference in the output for the Pg245 exercise. Maybe the authors wanted us to think more.
Reg ques7,pg267, I was just gonna post the same question. Looks like the option C is not correct answer. Can the other ranchers please confirm this.

Thx
 
Sharanya Sharma
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can anyone please confirm on the option 'C'.

Thx,
Sharanya
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option C seems valid in the question.

Think of the scenario:

ServletContext (aka Application) has 3 servlets (A, B and C).

Servlet A sets a Session Attribute.

Will Servlet B and/or C be able to read the session attribute ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic