Skip to main content

Set Administrator password for Tomcat


To enable access to the Manager Web application, you must either create a new username/password combination and associate one of the manager roles with it, or add a manager role to some existing username/password combination. To do that:

1.       Go to Tomcat installation directory > conf > tomcat-users.xml. Example C:\apache-tomcat-6.0.35\conf]\ tomcat-users.xml  Figure1
2.       Add the following two lines Figure 2:
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>

3.       Save it and restart tomcat.
4.       This will create a user called admin which used by the individual to log on, with the role of manager-gui

Figure 1 Open tomcat-users.xml

Figure 2 Add the highlighted two lines


Comments

Popular posts from this blog

Error Class names are only accepted if annotation processing is explicitly requested

Do you get the following error? Class names, 'Hello', are only accepted if annotation processing is explicitly requested 1 error In case you got this error, then you forget to add .java to the file name when you compile it So when you want to compile a file using cmd console window write the filename.java extension Example: Javac Hello.java If you write it in this way the error will go away. So don’t forget to include suffix with your file name during compilation.

An attempt was made to insert a node where it is not permitted

Do you face this Error while you are writing code to generate xml file from java? Exception in thread "main" org.w3c.dom.DOMException : HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.        at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(Unknown Source)        at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)        at generatexml.WriteXMLFile.main( WriteXMLFile.java:30 ) Well the answer is: Don't insert the node where it isn't permitted. Change your generated directory file path from 'C' to other directory ex, D or to any directory you have. Make sure the ‘appendChild’ is referring to the right element. Don’t appending twice, only make it once. Ex, //Writetoxml.java   Element rootElement = doc . createElement ( " Company " );   doc . appendChild ( ro...

What do you know about HKEY_LOCAL_MACHINE (HKLM)?

What is it? HKEY stands for " Handle to Registry Key ”. The HKEY_LOCAL_MACHINE subtree contains information about the local computer system, including hardware and operating system data, such as bus type, system memory, device drivers, and startup control parameters. It is one of several registry hives in the Windows Registry . HKEY_LOCAL_MACHINE contains the majority of the configuration information for the software you have installed and for the Windows operating system itself. It also contains information about currently detected hardware and, beginning in Windows Vista, information about your computer's boot configuration. HKLM components The following registry keys are located under the HKEY_LOCAL_MACHINE hive: HKEY_LOCAL_MACHINE\BCD00000000 HKEY_LOCAL_MACHINE\COMPONENTS HKEY_LOCAL_MACHINE\HARDWARE HKEY_LOCAL_MACHINE\SAM HKEY_LOCAL_MACHINE\Schema HKEY_LOCAL_MACHINE\SECURITY HKEY_LOCAL_MACHINE\SOFTWARE HKEY_LOCAL_MACHINE\SYSTEM No...