This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCWCD Exam study kit prolem!

 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I found a question when I am reading "SCWCD Exam study kit".
The Page 198, question 3:

Which of the following methods is defined by the JSP engine? (Select One)
a jspInit()
b _jspService()
c _jspService(ServletRequest, ServletResponse)
d _jspService(HttpServletRequest, HttpServletReponse)
e jspDestroy()

The answer given by the book is "d", of course, d is correct, but why the
a and e are wrong?

Greatly appreicate for solving my puzzle.

Hai
 
Sumitro Palit
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai

I think what the question implies is that out of these which function is defined by the engine and cannot be overriden any further. For jspInit & jspDestroy, the jsp engine generates default implementations but you can override them using jsp declarations and add your own init/destruct routines. Not so for the _jspService method - got to accept what the jsp engine generates from your jsp page.

The wording of the question isnt that good - but I think this is what the intent behind this question is.

- ortimuS
 
Gaurav Sahni
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, that is what the question means exactly.
refer to page 188, para 2 of the book for similar clarification provided.

Gaurav.
 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ortimus Tilap, Gaurav Sahni,
Thanks a lot.
You really answered my question.

Hai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic