jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <mich...@michaelmcgrady.com>
Subject Re: Using Image Taglib when J2EE application is inside (an unpacked) war file.
Date Fri, 04 Jun 2004 14:36:10 GMT
I am not used to working within war files, so I cannot be sure what sort of 
special requirements you have, but they must be similar, or working within 
a war file would be unwieldy.  If so, then perhaps a solution in Image 
taglib for absolute directories using an internal class to determine the 
file structure would be worthwhile?  I do that as follows:
public final class BaseAddress {
   public static final String HERE = 
Classpath.class.getClassLoader().getResource("com" + File.separator + 
"crackwillow" + File.separator + "classpath" + File.separator + 
"Classpath.class").getFile();
   public static final String WEB_INF = HERE.substring(0, 
HERE.lastIndexOf("classes"));
}
Can this be used inside a war file?

Michael

At 04:55 AM 6/4/2004, Matti Härö wrote:
>Hello,
>
> > To make this option work we need attributes to specify that it is an
> > absolute folder and the prefix to be used for creating the image urls
> > for the image tag.
> >
> > Do you think it is better to have a separate tag to do this than to
> > overload the existing image tag?
>
>We could have "absolute" attribute, that would specify that the dir 
>specified is
>an absolute path. Default for this attribute would be "false". Then there 
>would
>be a corresponding "url-prefix" attribute for accessing the image. Even if 
>this
>solution brings more complexity in the existing Image tag, I think it is 
>better
>than having a disting tag. After all, from the tag user point of view, it is
>still the same thing. Just the created image is stored in a different 
>directory.
>
>Having the possibility to store the images outside of the application context
>sounds a little bit scaring. But, the coin also has another side:
>
>Having the possibility to refer the image with an absolute URL makes it 
>possible
>for us to use a distinct, hardware-based image cache server for heavily loaded
>systems. Image Taglib would store the created image in a remote disk mounted
>into the application server directory. The created image url might point
>directly in the image cache server. In an environments like this, the image
>cache server is often located near the ISP for best bandwidths.
>
>
>-Matti Härö
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message