• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Session Management in HFSJ

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

can anyone please confirm on the option 'C'.

Thx,
Sharanya
 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic