tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terence M. Bandoian" <tere...@tmbsw.com>
Subject Static files with default servlet in tomcat 8.0.9
Date Mon, 12 Jan 2015 22:28:23 GMT
Please see my comments inline below.


On 1/12/2015 8:55 AM, Srikanth Hugar wrote:
> Hello,
>
>     I am trying to configure static files with default servlet in tomcat
> 8.0.9 but could not succeed.
>
> My directory structure in deployed webapp is:
>
> - WEB-INF
> - static
>       -css
>       -images
>       -js
> - META-INF
>
> and* web.xml* configuration using default servlet is :
>
>    <!-- static URLs -->
>      <servlet-mapping>
>          <servlet-name>default</servlet-name>
>          <url-pattern>/res/*</url-pattern>
>      </servlet-mapping>


Mappings for the default servlet should already be defined - check 
conf/web.xml.


>
> But when i make request from my page with URL it fails with 404.
> http://SUB.DOMAIN.COM/myapp/*res/static/*js/imports/jquerymin.js


Based on the directory structure above and assuming a context path of 
"myapp", the URL should be something like:

     http://SUB.DOMAIN.COM/myapp/static/js/imports/jquerymin.js

The folder "res" does not exist.

-Terence Bandoian


>
> What could be the problem?
> How can i make it work?
>
>
> I tried to find information from web, but could not help.
>
> Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message