tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mfncoo...@gmail.com>
Subject Re: packing images and style sheets with a taglib
Date Tue, 19 Apr 2005 21:18:01 GMT
On 4/19/05, Rahul P Akolkar <akolkar@us.ibm.com> wrote:
> > 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).

It also means you have to deal with cache headers, so that you're not
serving up the same images to the same browser again and again.

--
Martin Cooper


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

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message