0

Using a Tomcat 6.0 server, I'm trying to reference an image file that's not in the root directory of the application, but I get a 404 message that says the requested resource...is not available. (If I run the same program from Windows Explorer by double-clicking on it, I can use relative and absolute references and it works fine.) Is there a way to access the file and display it with the tag, using a Tomcat server?

  • can you please post your directory structure within app – jmj Mar 03 '11 at 11:03
  • possible duplicate of [load the image from outside of webcontext in jsf](http://stackoverflow.com/questions/4543936/load-the-image-from-outside-of-webcontext-in-jsf) and [Simplest way to serve static data from outside the application](http://stackoverflow.com/questions/1812244/simplest-way-to-serve-static-data-from-outside-the-application-server-in-a-java-w) – BalusC Mar 03 '11 at 14:13

1 Answers1

0

Take a look at JSTL core, more specifically at the url tag. It will dynamically add the context root in the links http://download.oracle.com/docs/cd/E17802_01/products/products/jsp/jstl/1.1/docs/tlddocs/c/tld-summary.html

bluefoot
  • 10,220
  • 11
  • 43
  • 56