users@glassfish.java.net

Serving static content

From: <forums_at_java.net>
Date: Mon, 11 Mar 2013 13:16:31 -0500 (CDT)

I'm developing a website with many pages. Most of these pages are static
content, but I am also writing a servlet to handle some user queries. At the
moment, most of the website is being developed by a team independently of the
servlet. My servlet will generate HTML web pages which need to include tags
which reference .jpgs in the main website. Right now I have a copy of the
static website on my harddrive. However, when I test my servlet, none of the
images I link to a displayed. The HTML I generate looks like: While this
displays correctly if I save the page to a file and then load the file in a
web browser, no images display when the same page is served to the same web
browser by GlassFish. I suspect GlassFish is refusing to resolve anything
starting with file:// for security reasons. Anyhow, how can I test out my
servlet? I'd like to be able to have links that can display images from the
static website files on my hard drive.

--
[Message sent by forum member 'kitfox']
View Post: http://forums.java.net/node/895596