-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joseph,

On 10/23/2009 8:02 AM, Joseph Morgan wrote:
> <taglib-location>../../../lib/tld/customTagLibs.tld</taglib-location>

Yikes! Why not use a context-relative path like:

<taglib-location>/lib/tld/customTagLibs.tld</taglib-location>

This assumes that "/lib" is in the root of your webapp. Perhaps all the
".."s are getting things confused.

I try never to use ".." in any path. Most paths starting with "/" are
guaranteed to be relative to the context root by either the servlet or
JSP specifications. This particular one is covered in section 1.2.1 of
the JSP 2.0 spec.

> Here is the interesting thing.  If I remove just the custom tag lib
> entry from tomcat's conf/web.xml and put it in any apps WEB-INF/web.xml,
> it works!

Aah, I think relative references are the problem here. The path is
relative to the JSP itself, so if you have JSPs are multiple levels, the
".."s will screw things up. If you are looking at /index.jsp, then the
tab library is expected to be in "[webapp root]/../../../lib/....."
which is almost certainly incorrect.

> That is, all my other "common" tag lib declarations are
> still in conf/web.xml, but the custom tag lib declaration is all by
> itself within the WEB-INF/web.xml file.  Everything else is exactly in
> the same place, under "{catalinahome}/lib"....

Oh, you need these files in catalina's lib directory? Why not deploy
them alongside your webapp (or each webapp that needs them)?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrlwrgACgkQ9CaO5/Lv0PAvwACfb+3wYyjHhcCUfnC4sTZv3GAW
A4YAoJFzgKlyxSFa7mjIOMvIzX+ujiMz
=Nlaj
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to