What is conf/web.xml used for in Tomcat as oppsed to the one in WEB-INF?

Yes, you definitely need it! It contains among others the declarations of the default servlet and the JSP servlet Without it, all requests which are not mapped on any of your servlets (e.g. CSS/JS/images) will cease to work and all JSP requests will return as plain unparsed source code.

Yes, you definitely need it! It contains among others the declarations of the default servlet and the JSP servlet. Without it, all requests which are not mapped on any of your servlets (e.g. CSS/JS/images) will cease to work and all JSP requests will return as plain unparsed source code.

Further it also contains a large mime type mapping so that the right content type will be set based on the file extension. Without it, all content will be delivered as application/octet-stream and the browser may fail to interpret the content.Do not remove Tomcat's own web.xml. It contains the minimum set of settings required to get your webapps to work properly.

You can at highest change the initialization parameters of the default servlet and JSP servlet there, such as enabling/disabling directory listings and enabling/disabling whitespace trimming and other minor performance settings. You can also add extra mime type mappings there, but you could also just do that on your webapp's own web.xml. This is also explicitly mentioned in the first comment block of Tomcat's web.xml.

Ok it contains parts that may not be defined in my local application web. Xml file. Sounds good.Thanks.

– Dan Howard May 9 at 13:09 It's also worth the effort to just read that web. Xml yourself so that you understand what the servletcontainer by default does. – BalusC May 9 at 13:11 Yeah thanks.

I've gone through all the settings. – Dan Howard May 9 at 13:21 You're welcome. – BalusC May 9 at 13:31.

The web. Xml under WEB-INF is a deployment descriptor which is applied to the current web application only and as such controls the running of just that web app. It allows you define your servlets, servlet mapping to URLs, context (startup) parameters etc.The web.

Xml under Tomcat's conf directory defines the default parameters for ALL applications on a Tomcat instance. In theory, this could be missing but then all of the web application deployed will have to define all of the settings in it -- such that . Jsp pages are processed by the JspServlet (which will compile them and load the generated servlet etc), all the mime mappings and default file lists (for those apps that don't specifiy it).

Think of it as a set of defaults which you can always override, however, they are there for your convenience so you don't have to define them for each app.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions