• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help viewing the Tomcat Manager

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Get out of my mind! Look! A tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic