users@glassfish.java.net

Static Content in Glassfish

From: <glassfish_at_javadesktop.org>
Date: Fri, 09 Feb 2007 12:42:57 PST

My question is how best to access static content in Glassfish?

I have an app that I'm porting from resin. My static content includes images, video, and pdf files.

My app finally works except for the static content. Either I'm not correctly referencing it nor I've incorrectly placed it onto the app server.

Glassfish put my content in:

[i] mydomain/applications/j2ee-modules/WARNAME/images
   mydomain/applications/j2ee-modules/WARNAME/video[/i]


My app is trying to reference:
   [i]http://localhost:8080/WARNAME/images/image.jpg[/i]

    of course, no image just the little 'x' indicating something is missing.

One page showed an error:
    cannot access [i]glassfish/domain/mydomain/config/webapps/WARFILE/video/video1.wmv[/i]

The file's actually located in:

   [i]applications/j2ee-modules/WARNAME/video/video1.wmv[/i]


Recommendations to straighten out my static content?
[Message sent by forum member 'tmonteit' (tmonteit)]

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