Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

apache tomcat manager problem

 
Jonathan Goode
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, basically i cannot access my tomcat manager thus my ant build.xml script is failing when it comes to install/remove a .war archive of my servlet with my tomcat manager. i can access my servlet visiting the URI http://localhost:8080/default/servlet but when i visit http://localhost:8080/manager/ it says "The requested resource (/manager) is not available". I have added a user to tomcat-users.xml with a manager role and manager.xml is in "apache-tomcat-5.5.15\conf\Catalina\localhost". I'm not entirely sure what manager.xml is supposed to contain but it was already in the folder when it told me to put it there whilst i was going through the apache tomcat documentation on how to configure the manager. host-manager.xml is also in the folder. Any help would be much appreciated. Regards.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what my manager.xml states:


Under that docBase location I have some html and a WEB-INF - a typical web application.
(You did restart Tomcat after changing the users file, right?)

Bill
 
Jonathan Goode
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. My manager.xml is identical to yours and yes under the location for docBase I have:

images
WEB-INF
html-manager-howto.html
manager-howto.html
manager.xml
status.xsd
xform.xsl

Yep I restarted Tomcat and in the past it has been restarted many times. By the way I'm using Eclipse 3.2 + Tomcat 5.5.15 + Ant 1.6.5 on Windows XP. Just incase (for manager.xml) where is ${catalina.home} set? Here is what my tomcat-users.xml looks like:



Does anything else need to be set? I guess accessing the Tomcat manager works fine for you with these things set? Thanks.
[ March 17, 2007: Message edited by: Jonathan Goode ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For CATALINA_HOME I let the startup.bat set it since I play with several different Tomcat versions.

This might be significant, my tomcat-users.xml also has a rolename entry for manager defined before the entry for <user :


Bill
 
Jonathan Goode
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still no joy. I've tried starting from fresh and downloading Apache Tomcat 5.5.15 again then changing tomcat-users.xml to have a user with a manager role then going to http://localhost:8080/manager but I still keep getting a 404 error. When I started from fresh and added a new user with a manager role then started Tomcat, when I went back to add the line you said Tomcat had already done it for me - no difference. (By default there is manager.xml already in C:\Program Files\Java\apache-tomcat-5.5.15\conf\Catalina\localhost.) I also took Eclipse out of the equation too has previously I used it to start/stop Tomcat but nothing. I don't understand why http://localhost:8080/servlets-examples/ works but manager doesn't! I've run setclasspath.bat and added "pause" to it to see it going through each method checking that it sets everything Ok and hits no errors and it does but kinda new that it was fine seen as though http://localhost:8080/servlets-examples/ works. I can't see in the documentation that there is anything to set to get manager to work? Many thanks for your help but this is outrageous!
[ March 18, 2007: Message edited by: Jonathan Goode ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats it, Ben nailed it. Sorry I didn't notice that in your first post.
The plain /manager/ url is used for simple commands, not the HTML interface.
Using the simple commands is explained in the manager-howto.html that tomcat installations have under tomcat-docs.

Bill
[ March 19, 2007: Message edited by: William Brogden ]
 
Jonathan Goode
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ever so much for your help William and Ben! What a fool I am! Everything is working now including my ant build script which compiles/wars/deploys to tomcat. I also had further problems with Eclipse running Tomcat and then accessing the manager but sorted it all out with a little tweaking here and there. Cheers.
[ March 19, 2007: Message edited by: Jonathan Goode ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic