tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul P Akolkar <akol...@us.ibm.com>
Subject Re: packing images and style sheets with a taglib
Date Tue, 19 Apr 2005 21:08:17 GMT
> 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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message