• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

i have a question

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
was looking through some jwcd questionaire's and found a very weird question.. which i am unable to fathom..
Which of the following staments are correct about the following jsp lines:
Given the following jsp line select the correct statements:
<% public void jspInit() { ...java code...} %>
the answer says
1) It is a valid line that can be used to initialize the servlet that implements the jsp file.
Now I am curious.. I assume since it is a scriptlet it goes into the service method right.. and how can jspInit show up inside a service method..
could someone clarify how this function.... could be right
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this is just a typo.
Instead of

It should be:

Nick
 
Niki Sharma
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nic
thanks for the response

>>2.
<taglib>
<taglib-uri>/binomial</taglib-uri>
<taglib-location>/WEB-INF/MathLib.jar</taglib-location>
</taglib>
there was another questionairre i was going through that said this was invalid.. I presume is it correct
I was of the assumption that one could reference a jar file as you tag-lib location.. and it would be valid.. Do you have any inputs on this..
thanks ..
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is a valid taglib definition, if and only if, the xxx.tld is located at the /META-INF inside the JAR file.
If the .tld file does not locate in that directory, the taglib cannot be found.
Nick
 
reply
    Bookmark Topic Watch Topic
  • New Topic