File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Which of the following statements are correct regarding tag libraries? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Which of the following statements are correct regarding tag libraries?" Watch "Which of the following statements are correct regarding tag libraries?" New topic
Author

Which of the following statements are correct regarding tag libraries?

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
1)

The tag library descriptor for a tag library must be kept in META-INF/taglib.tld, if the tag library is packaged in a jar file

2)

The tag library descriptor for a tag library may be kept in WEB-INF/taglib.tld, if the tag library is packaged in a jar file.

3)

A JSP 2.0 compliant container is guaranteed to generate impliciting mapping for JSTL tag libraries.

4)

A JSP 2.0 compliant container will automatically genarate an implicit tag library for a set of tag files.

5)

The tag library descriptor for a tag library not packaged as a jar file may be kept anywhere in /tld directory of the web application's document root.

Please Advise..i am confused about the answer..


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11277
    
  59

Please quote your sources. Many people refuse to answer questions that are unsourced, and it is not uncommon for questions to be deleted if the source is not provided (especially in the cases where the same person posts many questions without ever listing a source).

Also, you should show some effort. What answer(s) did you think were correct? What did you think was wrong? Why? It is only with this information that someone can start to provide you with help.

- Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Sunny Jain
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

Hi Amandeep,

I think you have misunderstood the concept behind javaranch. It will help you to grow and learn only if will do some effort at your side. Java ranch will help you to clear the concept if you have any confusion, or help you to start up if you want to learn anything new.

This is quite simple question, if you read the HFSJ chapter 10 or last pages of Chapter 9. you will get the answer of this question. If you still find some difficulties then you can any time come to javaranch, people are here to clear your concept.


Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Well this question is from Enthuware.

I know its given in HFSJ book, the correct answer is 3.

But in Enthuware the correct answer given us 4. So both are conflicting.

According to me the correct answer is 3.
Sunny Jain
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

Hi Amandeep,

First you should know the difference between tag handler and tag files.
if you see the tag handler and tag files there is one similarity:
they both are invoked using <prefix:TAGGING>

Now there must be a tag library which help to decide jsp container which method or file to be invoked.

now in case of tag handler we provide a tld file. but in case of tag files we dont provide any thing..! so container has to generate it by its own. Rules doesn't change for tag files. we still need a kind of mapping.
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Jain, your answer is right upto some extent... But first you should clear the difference between what is implicit mapping and explicit mapping?

When we define the taglib element and its child elements as tablib-uri and taglib-location, that is called the explicit mapping.

But when we only define the uri in tld files, it is called implicit mapping.

So un case of JSTL tag libraries, if we define, uri through taglib element, then whatever the mapping is generated is called, implicit mapping.

So the option 3 is also right along with 4.

Please do read the 475 page for HFSJ book.
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Finally What is the correct answer.
[ August 19, 2008: Message edited by: Chintu sirivennela ]

SCJP 5 |SCWCD 5| Started thinking about Web Services ?
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
In the book, the correct answer given is 4.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which of the following statements are correct regarding tag libraries?
 
Similar Threads
Question about Tag lib
A javabeat ques on tag library.
Location and name of tld
TLD files placement in JSP
tag file doubt (javabeat mock question)