aspose file tools*
The moose likes Tomcat and the fly likes Need help viewing the Tomcat Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Need help viewing the Tomcat Manager" Watch "Need help viewing the Tomcat Manager" New topic
Author

Need help viewing the Tomcat Manager

Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hi All,
I would like to look at the Tomcat Manager, but when I try, I am prompted to enter a name and password. Ia m not sure what to use for these values. I did a search here and found the following info:
A lot of this information can be seen from the Tomcat Manager/html application .

On a default install:
http://localhost:8080/manager/html

You may need to add your name to the realm in the tomcat/conf/tomcat-users.xml file. Once on the page, click the Server Status link on the right side of the header.


My question is, what does it mean to "add your name" to the realm in the tomcat-users.xml file? I tried to enter one of the name/passwords that I saw in this file, but the name/password prompt just cleared and didnt let me enter the manager.
Thanks for any info! Kim
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hey, I have found more info on :http://tomcat.apache.org/tomcat-4.1-doc/manager-howto.html


I am still struggling though on this step:

JDBCRealm - Your user and role information is stored in a database accessed via JDBC. Add the manager role to one or more existing users, and/or create one or more new users with this role assigned, following the standard procedures for your environment.


I am using a JDBCRealm. I had assumed I should add a userName and password to tomcat-users.xml, but since I am using a JDBCRealm, does the above quote indicate that I need to edit a database table? I have looked at my database users and dont see anywhere to add roles. I just see how to manage permissions. Help!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
The tomcat-users.xml file is only used for MemoryRealm, not for any of the others. Have a look at the JDBCRealm documentation. It has a simple example of how to access your user/role tables, but your tables can be more complicated if need be. Just make sure to enter the table and attribute names correctly in the respective attributes in the server.xml file.


Ping & DNS - my free Android networking tools app
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Hi ,
Sorry, I made a mistake. I am not using a JDBC Realm. It was defined in my Server.xml file, but I just learned that it is a bit of legacy code, its not used anymore, so I guess I do need to user Tomcat-Users.xml. I wonder why it will not work. Here is what I have put in to tomcat-users:



Shouldn't I be able to start the manager using name=kim password=kim ?
Kim Kantola
Ranch Hand

Joined: May 17, 2001
Posts: 274
Success ! Turns out that my REALM was not defined correctly in my server.xml file. As soon as I fixed that, I was able to log into the manager.

I had the realm defined as a JDBCRealm, but it refered to database tables which didnt even exist, when i switched over to MemoryREALM, everything works fine.

Thanks for the input!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help viewing the Tomcat Manager