Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all articles
Browse latest Browse all 1091

Serving static content

$
0
0

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.


Viewing all articles
Browse latest Browse all 1091

Trending Articles