users@glassfish.java.net

Re: serving images with glassfish

From: <glassfish_at_javadesktop.org>
Date: Fri, 30 Jan 2009 09:28:37 PST

> 1. Is there any way of making glassfish access
> external files (for example files under
> /var/pictures)

You can create a minimal /var/pictures/WEB-INF/web.xml that only contains "<web-app/>" and then do "asadmin deploy /var/pictures". Or you can use symbolic links from the docroot, but you have to change the configuration to allow symbolic links since this is not the default.

> 2. How can I calculate the Etag header. it is
> something like W\"somenumber-someothernumber"

I don't know how GlassFish calculates Etags, but you can invent your own Etag as long as it satisfies the requirements in section 3.11 of RFC2616, i.e. that the Etag "MUST be unique across all versions of all entities associated with a particular resource". With the W (for Weak) present, the Etag stands for semantic equivalence between versions, without the W it stands for literal, binary equivalence.
[Message sent by forum member 'bjornd' (bjornd)]

http://forums.java.net/jive/thread.jspa?messageID=329266