jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abey Mullassery <a...@mullassery.com>
Subject Re: Using Image Taglib when J2EE application is inside (an unpacked) war file.
Date Fri, 04 Jun 2004 11:06:11 GMT

The directory that Image taglib uses is not a cache. The final images 
are generated into it. This has great performance advantages.

The image taglib does not use a servlet to serve the request for the 
image. It generates the images into a directory once during startup (if 
refresh attribute is not set) and the appropriate url is specified in 
the <img> html tag. The means that it is generated only when it is 
required and for the rest of the time it is served just like static 
images. This mimics the normal static scenario and is a LOT simpler.

As you know the request for the image comes separately later after the 
html page is loaded by the browser. If the images are generated into 
another folder it would not be within the web site.

Can it be specified in JBoss/Jetty to unpack the war?

If not, the Image taglib may have to be changed to,
1. Use a servlet to serve the once generated images from an absolute 
directory (slightly slower)
2. Use the servlet to generate the images and stream everytime (much 
slower and lot of issues to solve)
3. Allow target folders outside the context and use server conf/settings 
to map a folder outside the webapp!!??

But any of the above changes will increase the complexity of the 
implementation.

Can anyone suggest any other better/ smart solutions?


Abey Mullassery
http://www.mullassery.com


Matti Härö wrote:
> Hi,
> 
> In some of our services, we have JBoss/Jetty as application server. Jetty does
> not unpack the war file of our application while in startup, like Tomcat does.
> This results in Image Taglib being unable to create a directory "gen-images" for
> caching the created, resized image. There is a "dir" attribute for the tag, but
> this attribute is handled as relative to the context path, which points, again,
> inside the war file. So, using the "dir" attribute does not help with the
> problem. Is there a way to specify absolute directory for image caching, or is
> there another way of being able to use the Image Tag library with environments
> where the war files are never unpacked for execution?
> 
> With best regards,
> Matti Härö
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> 
> 

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


Mime
View raw message