You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thusitha Thilina Dayaratne <th...@gmail.com> on 2015/05/16 17:34:24 UTC

Accessing static resources return 404 in embedded tomcat

Hi,

I'm using embedded Tomcat 7.0.59. I;m trying to access a static resource
through the embedded server. In the server.xml file I've added following
line

<Host name="localhost" unpackWARs="true" deployOnStartup="false"
autoDeploy="false"
appBase="${carbon.home}/repository/deployment/server/webapps/">
        *  <Context  docBase="/home/thusitha/abc" path="/test/res" /> *
....
I have an empty xml file in the /home/thusitha/abc folder.

On the browser when I try to access it as follows I'm getting 404 error.
localhost:9443/test/res/abc.xml

What could be the reason for this?

Thanks
Best Regards
--