Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

taglib query

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers.

The page 474, of HFS says that taglib <uri> IS JUST A NAME & not a location. But there were many questions in J2EECertificate thats against the above statement. For example..

Which of the following taglib directives are properly formatted? [Check all correct answers]
1. <%@ taglib uri="/WEB-INF/tld/a.tld" prefix="mytag" /%>
2. <%@ taglib prefix="mytag" uri="/myLib" %>
3. <@ taglib prefix="mytag" uri="/WEB-INF/tld/a.tld" %>
4. <%@ taglib uri="/WEB-INF/tld/a.tld" prefix="mytag" %>
5. <%@ taglib prefix="mytag" uri="/WEB-INF/tld/b.jar" %>

Answer 2, 4 and 5 are correct.
Answer 1 is incorrect, the taglib directive has a trailing /.
Answer 2 is correct, this is an example of using a relative URI.
Answer 3 is incorrect, the '%' is missing.
Answer 4 is correct, this is an example of using an absolute URI.
Answer 5 is correct, this example uses a packaged jar file.

Ans2 talks about relative URL but the HFS says <uri> is just a name not a location.

Please clarify??

Thanks
 
Kiaama Liames
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the syntaxref a URI can be both A Uniform Resource Locator or a Uniform Resource Name and can have both absolute and relative path name

http://java.sun.com/products/jsp/syntax/1.2/syntaxref1211.html
 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

1. HFS Says URI cannot be Location
2. j2eecertificate.com says URI can be a relative path
3. The above url says the URI can be both relative & abs path

so.... what is the outcome...m little bit confused.


Shashank
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic