This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP method

 
Richard Rex
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers!

I've seen this question in one of the mock exams I've been doing.

Which of the following methods can be overriden by the author of a JSP page?

a. void jspInit()
b. void _jspService(HttpServletRequest request, HttpServletResponse response)
c. void jspDestroy()
d. None of the above

I was supposed to answer A and D, but the engine allows only one answer... So I answered A.

And looked at it again after the mock exam and the engine says its D.

My question is why??? The mock unfortunately doesn't have explanation why...
 
subathra sangameswaran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The API says clearly that jspInit() and jspDestroy() may be overridden in a JSP Page using the declaration element.
May be the mock exam is just trying desparately to complicate things with the access modifiers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic