after reading various questions about how to handle images on tomcat I followed the approach to set a folder with images at tomcat following the instructions here: Simplest way to serve static data from outside the application server in a Java web application but it doesn't work and I cannot understand what I am doing wrong.
I've set the context in server.xml as described:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context docBase="C:\ServerFiles\" path="/images" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
and I also tried this:
<Context docBase="C:\ServerFiles" path="/images" />
instead of the above.
The image is located at
C:\ServerFiles
and its name is index.jpg
and this is how i try to retrieve it with jsf
<img src="/images/index.jpg" />
but it doens't work
Can you help me? I cannot understand what I am doing wrong.