Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

SCWCD Exam study kit prolem!  RSS feed

 
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
 
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
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!