This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

some jsp questions

 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) why <%@ page %> is not a valid directive, considering that all attrinutes are optional ?
2) should you specify a protocol e.g. jar:// if you want to specify jar file under taglib-location tag in web.xml ? I see an example in manning book (without any jar://) on page 288 which is as follows :
<taglib>
<taglib-uri>
http://www.manning.com/samplelib
</taglib-uri>
<taglib-location>
yourLibs/sample.jar
</taglib-location>
</taglib>
However, I came across such question in one of the mock exams and the explanation given was if you want to use a jar file as the location of the .tld file in web.xml, then you have to use an absolute url that includes the protocol such as jar://
3) if jsp:getProperty tag is used before jsp:setProperty, what values will be printed ? I think the values will be the default values i.e. Objects will be initialized to null and primitive data types will be initialized to zero (for int, long), false for boolean etc. Is that right ?
thanks in advance
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!