> From: Junqiang Zhang [mailto:junqiangzh...@gmail.com] > Subject: Re: Tomcat can not locate the folders of CSS files inside a web app, > if the url-pattern of a servlet is set to / inside web.xml
Don't top-post. See item 6 under http://tomcat.apache.org/lists.html#tomcat-users > I did map my servlet to the url-pattern "/". The point we're trying to make is that you must not use a servlet mapping of "/" unless your servlet can handle the duties of DefaultServlet, including delivering static content such as CSS files and images. Your mappings need to be more specific (as you appear to have already discovered, based on your first message). > Is there any setting could let web browsers find the static content inside > the webapp > directory? If I put the static content into some other places, can web > browsers find > the css file? Note that web browsers do not "find" the content inside the webapp directory; that's entirely up to the servlets of the webapp, including Tomcat's built-in DefaultServlet - if you haven't disabled it by mapping something else to "/". Correct your servlet mapping and things will work as desired. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org