This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 20912 - Adding standard tag lib to web app does not update deployment descriptor
Summary: Adding standard tag lib to web app does not update deployment descriptor
Status: CLOSED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: All All
: P1 blocker (vote)
Assignee: sgleason
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-27 00:13 UTC by jhoffman
Modified: 2010-01-12 02:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhoffman 2002-02-27 00:13:34 UTC
Steps to reproduce:

1. Mount (or create) a web module
2. Select Add JSP Tag Lib > Find in Tag Lib Repository menu item from the WEB-INF node
3. Click the OK button
4. Tag library files are added (and mounted), but no entry is created in the deployment descriptor file

The taglib entry with:
    URI = /standard 
    taglib location = /WEB-INF/lib/standard.jar
should be in the deployment descriptor
Comment 1 sgleason 2002-02-27 00:48:52 UTC
This isn't actually a bug, for the following reasons:

1. the standard tag lib should have an entry in web.xml, 
   because it is used by putting the absolute URIs into
   the taglib directive, and our current mechanism for
   putting uris into web.xml would give us 
   /standard as the uri, which would be misleading to 
   the user and not work. 

2. the reason it doesn't get an entry is because it doesn't
   have META-INF/taglib.tld in it. By our definition, this
   means it's not a "tag library jar," so we don't create 
   an entry. According to the spec (at least my reading
   of it), this means that standard.jar is non compliant. 
   I will take this up with the JSR. 

3. Our current method of putting taglib entries into web.xml
   doesn't take into account the possibility of multiple 
   taglibs in a jar. Perhaps the right way is to list
   all the URIs from all the taglibs in the jar?
   (the jsp engine creates implicit taglib entries for all
   the tlds that have their uri field set, so if we do it
   it will be redundant; I'm not sure it will work; but
   it may be more informative for the user). 

So, in conclusion, I think we should think of this as
aberrant behaviour. 

Comment 2 Petr Jiricka 2002-02-27 11:37:31 UTC
I agree this is not a bug.

To Simran's 2.: Section 7.2.1 of the JSP spec indicates that the META-
INF/taglib.tld entry is not needed, as long as there is at least one 
other .tld file in (or under) META-INF. So standard.jar is compliant 
with JSP 1.2.

To me it seems that putting taglib entries into web.xml is not the 
preferred way in JSP 1.2, and that it is enough to just drop the 
taglib jar to the application, see section 7.3.4 of the spec.

The page can refer to a tag library directly by

<%@taglib uri="http://java.sun.com/jstl/ea/core" prefix="c"%>

A useful hint is to type

<%@taglib uri="

into the editor and press Ctrl+Space to get code completion - it will 
list all available taglibs.
Comment 3 Petr Jiricka 2002-04-23 10:02:42 UTC
Changing target milestone to FFJ 4.0
Comment 4 Petr Jiricka 2002-04-23 10:13:31 UTC
Changing target milestone to FFJ 4.0
Comment 5 Jason Rush 2003-02-02 10:53:58 UTC
I agree that this is invalid for the reasons Simran and 
Petr have listed.  Closing.