• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not convinced by the answer for Chapter 5 Mock Exam question

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

This is a question on Chapter 5 Mock Exam question(No.7) of Head First Servlets Book. Here is the exam question.

"Which is most logically stored as an attribute in session scope?"

One of the options which I thought was correct, was shown wrong. Here is the option.

"A copy of a query parameter entered by a user."

Why is this not a correct option? There could be a case where I might want to store that parameter in the session for further use.

(I am new to this forum, so if I need to provide more info or post differently, let me know), thanks!
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

A query parameter would usually go in the request object.

Could you please give the other options!

Regards
 
Nivedita Thakur
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A. A copy of a query parameter entered by a user

B. The result of a database query to be returned immediately to user.

C. A database connection object used by all web components of the system.

D. An object representing a user who has just logged into the system.

E. A copy of an initialization parameter retrieved from a ServletContext object.


I conveniently overlooked the word "most" in the question and opted for two answers i.e. A and D. Apparently, D is most logical.
Thanks for the reply!
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome

That's a common mistake, looked like a CAT question
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic