Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are we expected to memorize the API's of ServletRequest ..etc

 
Srikanth shetty Nukala
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While solving mock exams i came along a question which had the explanation saying: "the setAttribute() method is provided by ServletRequest and inherited by HttpServletRequest."

So for the exam are we expected to memorize the API's with each method signature??

It is expected to remember DD elements i suppose.

Thanks.
 
Akshay Kiran
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YES!
not all but most of the important one you're expected to know.
 
Srikanth shetty Nukala
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey man thanks, will have to memorize the API's ...
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth, But we can do good logical thinking here to arrive at the answer, I suppose.

See ... Attributes could be part of ServletRequest interface itself irrespective of whether it is an HTTP flavour or not. This is because when you talk about a "scoping object" like request, we need to store attributes against it whether it is HttpServletRequest or ServletRequest. Got me?

Whereas consider setHeader(...), headers are inherent part of HTTP thus is unique method which is there in HttpServletRequest only.

Sessions are also inherent part of HTTP and so we dont have anything like Session and HttpSession interfaces.

Hope you got what I am saying ...

Nevertheless, memorising APIs is good

Regards,
Mani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic