Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cobins Exam Very complectaed

 
Hussain
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 4)
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.
Answer : 1
why i think it won't compile as everything goes into service as they entered in Scriplets....
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, 1) would be right if the method were defined as <%! public void jspInit() ... %>. Note exclamation mark.
- Peter
[ March 06, 2002: Message edited by: Peter den Haan ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic