Tomcat configuration file - web.xml
Tomcat configuration file (web.xml) is using XML pattern, which the global configuration file is within tomcat\conf directory, and individual configuration file is within tomcat\wepapps\webdir\WEB-INF directory. User can always refer to the global configuration file as a sample to set the individual configuration file. The parent node of web.xml is <web-app> and below is the common nodes that can be used:
- Description for the web application.
<description>
Description for Web Application
</description> - Map the servlet to associate class and URL pattern.
<servlet>
<servlet-name>servlet name</servlet-name>
<servlet-class>class name</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>servlet name</servlet-name>
<url-pattern>url pattern</url-pattern>
</servlet-mapping>
- Map the taglib to associate TLD files.
<taglib>
<taglib-uri>
http://www.gnokproject.com/taglibs/taglib-v1.0
</taglib-uri>
<taglib-location>
/WEB-INF/jsp/taglib.tld
</taglib-location>
</taglib> - Map extension to associate mime type.
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
- Session timeout.
<session-config>
<session-timeout>30</session-timeout>
</session-config>
- First file to be accessed.
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

1 comments:
Hi,
Very interesting. Nice article and discussion.
Thanks a lot for same.
Regards,
Gitesh Trivedi
http://www.dbametrix.com
Post a Comment