I have tested on Tomcat versions 8.0.30, 8.0.32, and 9.0.0.M3. A web app is put inside a folder (let's say the name of the foder is mywebapp) inside the Tomcat webapps directory. The folder for css files (let's say the name of folder is css) is located inside this web app folder. There is no index.html or index.jsp inside the web app folder. The structure is as the follows.
Tomcat ----webapps -------mywebapp -------css -------styles.css -------images -------META-INF -------scripts -------WEB-INF -------classes -------someservlet.class -------lib -------src -------someservlet.java -------web.xml If the url-pattern of someservlet.class is set to / inside web.xml, someservlet.class can be access using http://www.somewebsite.com/mywebapp The problem is that web browsers cannot locate styles.css at http://www.somewebsite.com/mywebapp/css/styles.css. Therefor, styles.css cannot be applied on the html file generated by someservlet.class. Probably other folders or files inside mywebapp directory cannot be accessed by web browsers too. If the url-pattern of someservlet.class is set to /someclass inside web.xml, someservlet.class can be access using http://www.somewebsite.com/mywebapp/someclass . Web browsers can correctly locate styles.css at http://www.somewebsite.com/mywebapp/css/styles.css Any solution to this problem? Does it solve this problem if I use Jetty or Glassfish? Thanks. Junqiang --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org