tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <>
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 <> 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:
For additional commands, e-mail:

View raw message