logo

Tomcat configuration files, manager application

Tomcat configuration files: server.xml, tomcat-users.xml explained. How to access Tomcat Manager application.

In conf directory are Tomcat configuration files. The most important one is server.xml, where is for example defined on which ports this server runs and other server configuration.

 

Tomcat applications can use Java EE security, which needs information about users, their passwords and roles. All this is by default in tomcat-users.xml file (you can change this in server.xml). Out of the box for security reasons there are no users and even no roles.

 

web.xml file contains default configuration fo all web applications on current Tomcat instance.

 

context.xml file will be loaded for each application and can be used for definition of resources.

 

First we would like to access Manager application in Tomcat. Access to this application is restricted using Java EE security. If you press Cancel, you will see some explanation. You must go to tomcat-users.xml file and add role with rolename manager-gui and next some user with some password which will have this role.

 

Let's do this.

 

If you change anything in config files, you must restart whole server, because they are read on startup.

 

Now you will be able to access Tomcat Manager application. There you can see list of applications, you can undeploy application from this server, you can deploy an application to this server and do some other stuff.


comments powered by Disqus

rss

Free online Java web application examples

Want to develop whole web applications which use database, security and more? See my github account, where are lot's of example projects:
github

Search