Tomcat Administrator Conflict

I recently was working on a J2EE application on Tomcat that contained a sub-folder named “admin”. During most of the development process the application was not being run from the “/” root context. When the application was moved to the root context the “admin” sub-folder conflicted with the “/admin” context that Tomcat comes with by default. No problem, I just directed my browser to the “/manager” context and clicked the “remove” link for the “/admin” context. Conflict resolved. But the next day I turned my development machine back on and the conflict was back, Tomcat had re-deployed the “/admin” context! After a bit of research I found out that the entry for the “/admin” context is generated through a file called “admin.xml” in Tomcat’s webapps directory. To permanently remove the “/admin” context you can just delete the “admin.xml” file. If you want to keep the administration tool you can alter the path attribute of the context element in the admin.xml file. I was able to remove my conflict by changing the path attribute from “/admin” to “/tomcat_admin”.

This entry was posted in General. Bookmark the permalink.

Comments are closed.