users@glassfish.java.net

Re: serving images with glassfish

From: Dennis Gesker <dennis_at_gesker.com>
Date: Fri, 30 Jan 2009 11:26:56 -0700

Give this site a try

http://balusc.blogspot.com/2007/07/fileservlet.html

Dennis

On Thu, Jan 29, 2009 at 7:35 PM, <glassfish_at_javadesktop.org> wrote:
> Hello,
>
> Currently I am in a situation where I dont want to use mod_jk or mod_ajp and I want to serve images with glassfish. Thus, I wrote a servlet that opens the file and streams it tru the servlet.
>
> It works all fine, but I noticed that normal files i get tru glassfish does have Etag response header. I am also using a servlet filter that calculates and puts an Expires header.
>
> Questions:
>
> 1. Is there any way of making glassfish access external files (for example files under /var/pictures)
>
> 2. How can I calculate the Etag header. it is something like W\"somenumber-someothernumber"
>
> Best.
>
> -C.B.
> [Message sent by forum member 'cambazz' (cambazz)]
>
> http://forums.java.net/jive/thread.jspa?messageID=329142
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>



-- 
Dennis R. Gesker
email: dennis_at_gesker.com
google talk: gesker_at_gmail.com
aim: dennisgesker
pgp/gpg: 0x267D3FE8
First things first, but not necessarily in that order. -- Unknown