users@glassfish.java.net

relative paths to images in a web-app on glassfish

From: HAcland <hughacland_at_googlemail.com>
Date: Wed, 14 May 2008 06:21:34 -0700 (PDT)

Hi,

I have run up against a seemingly bizarre problem. My web-app contains
images in a folder web/secure/images/logo.jpg

One of my servlets references the image thus:

out.write(" \"../web/secure/images/logo.jpg\" ");

When this code is run on Sun Java System Application Server 9.1_01 (build
b09d-fcs) it works fine and glassfish is able to use the relative path to
find the image and the image is displayed correctly.

However, I have just moved the whole app with EXACTLY the same code to a
different physical server running exactly the same version and build of
glassfish. Now the app runs fine with the exception that the images are not
displayed. This different installation of Glassfish seemingly can not use
relative paths for the images however it can and does use
"../secure/MyServlet.do" correctly.

Can anyone shed some light on this problem please? Is there a setting on the
server which needs tweaking?

Many thanks,
Hugh

-- 
View this message in context: http://www.nabble.com/relative-paths-to-images-in-a-web-app-on-glassfish-tp17230934p17230934.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.