Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jspInit

 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the following jsp line select the correct statements:
<% public void jspInit() { ...java code...} %>

1) It is a valid line that can be used to initialize the servlet that implements the jsp file.
2) It won't compile as no identifer can start with jsp not _jsp.
3) It will serve as the servlet initialization if the function's name is _jspInit.
4) There is no way to initialize a jsp's implementation class servlet.

can anyone please explain me what the correct answer is?
The correct answer given is 1.

But I think that the methods should be written in JSP declaratons.
Right??? we should use <%! %> instead of <% %>(JSP scriptlet)
Thanks
Shanthi
[ February 16, 2006: Message edited by: shanthisri mocherla ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right. It has already be discussed before. Search for the thread
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get details from here...

http://www.coderanch.com/t/171374/java-Web-Component-SCWCD/certification/jspInit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic