Static Content
Serve Static Content
Serving Static External Files in standalone Tomcat Instances
Edit conf/server.xml
and add the following to the
*Host name="localhost"...
section:
<Context path="/js" appBase=""
docBase="c:/repository/tomcat/static/django"
debug="99" reloadable="true">
</Context>
Note:
Place static content in
c:\\repository\\tomcat\\static\\django
.The content will be accessible using this URL: http://localhost:8080/js/temp.html
I am not sure this is the correct way to serve static content using Tomcat. If we do not specify the
C:
drive in thedocBase
, then Tomcat will look inside thewebapps
folder.