Thursday 23 February 2012

setup Tomcat admin and manager password


Apache Tomcat is a servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a “pure Java” HTTP web server environment for Java code to run.

Tomcat should not be confused with the Apache web server, which is a C implementation of an HTTP web server; these two web servers are not bundled together. Apache Tomcat includes tools for configuration and management, but can also be configured by editing XML configuration files.
Question :
How to enable  Tomcat  admin password  ?
answer :
Tomcat5.5 and 6.x  do not enable admin or manager access by default. We have to manully edit tomcat-users.xml to allow admin access. VI your tomcat-users.xml in   /etc/tomcat6  folder, content is something like following
role rolename=”tomcat”/>
role rolename=”role1″/>
user username=”tomcat” password=”tomcat” roles=”tomcat”/>
user username=”both” password=”tomcat” roles=”tomcat,role1″/>
user username=”role1″ password=”tomcat” roles=”role1″/>

No comments:

Post a Comment