The location you've suggested is sensible, but personally I'd prefer if the tlds were delivered inside their jars. It seems more of a 'best practice' thing to do (eg it avoids problems with jars mismatching tlds)

"When deployed inside a JAR file, the tag library descriptor files must be in the META-INF directory, or a subdirectory of it."
(JSP1.2, sec 7.3.1)


Its only when the tld is deployed separately from the jar that you put it in WEB-INF. Is there a reason for distributing the TLDs separately? (I know JSP 1.1 only supported single tlds per jar, which wouldnt have worked for eg struts, but apart from that? - and is JSP1.1 a requirement?)

As for manipulating web.xml - you don't need to add entries to web.xml for taglibs if the tlds follow the 1.2 spec:

sec 7.3.4:
The taglib map described in web.xml is extended with new entries extracted from TLD files in the Web Application. The new entries are computed as follows:
• Each TLD file is examined. If it has a <uri> element, then a new <taglib> element is created, with a <taglib-uri> subelement whose value is that of the <uri> elemement, and with a <taglib-location> subelement that refers to the TLD file.
• If the created <taglib> element has a different <taglib-uri> to any int
he taglib map, it is added.


You also dont need to list taglibs in web.xml if the <[EMAIL PROTECTED] directive refers to the actual location of the taglib, eg:
<%@ taglib uri="/WEB-INF/tld/bingo.tld" prefix="bongo" %>
(this is in 7.3.6.3)


Michal Maczka wrote:

I am bit busy at the moment but hope to have time to work a bit on war
plugin soon (hope to have it done before rc1 is out)


There was a request to support "bundling" of TLD files in war archive. I am going to implement it.

I am planning to set default directory for TLDS files accordingly to:

http://developer.java.sun.com/developer/technicalArticles/javaserverpages/co
de_convention/


so it will be


<context root>/WEB-INF/tld/


and have property:


maven.war.build.tld.dir which will allow to customize it


I personally use following layout:


<context root>/WEB-INF/tld/jstl/
<context root>/WEB-INF/tld/struts/
<context root>/WEB-INF/tld/foo/


for grouping certain taglibs. Such layout can be easily supported using>
groupId property of the dependency.


Somebody else likes it?


Maybe somebody knows better strategies?



Any other types of artifact should be supported? Should we go down to the level of css, JavaScript files or even images (gifs, jpegs). I personally don't think so. I like the concept of "web component" dissussed some time ago.


We can also think if we are going to have "extra features" like: appending tag libs dynamically to web.xml file. From the point of view
of XML manipulation it is very simple. But then some extra metadata should
be provided along with tlds dependency (like uri).



Michal


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Privacy and Confidentiality Notice


------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed. Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege. If you have received it in error, please destroy it and notify us on the telephone number printed above. If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to