> I have a taglib that I am packaging up as a jar 
> and I'm trying to figure out how I can package it
> with images and style sheets that could be 
> referenced in a relative path like <img 
> src="/mytaglibimages/car.gif"> in the taglib code. 

Not sure if you can get relative paths to work with no overhead to the 
taglib user. 

One possibility is to serve the resources using a servlet that maps to the 
url pattern /mytaglibimages/* (or some such). This allows you to pack the 
resources and the servlet in your distro, but the user needs to add the 
servlet definition/mapping to the deployment descriptor (which, arguably, 
might be less error-prone, less of an overhead and easier to document).

-Rahul

P.S.- If you choose to put the servlet in, package java.util.jar provides 
the necessary classes.

Reply via email to