aspose file tools*
The moose likes Tomcat and the fly likes Update of Tomcat-users.xml by Tomcat Administration Tool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Update of Tomcat-users.xml by Tomcat Administration Tool" Watch "Update of Tomcat-users.xml by Tomcat Administration Tool" New topic
Author

Update of Tomcat-users.xml by Tomcat Administration Tool

Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi all,

I have clarification regarding the user management of Tomcat server.

1. When we make updation of tomcat-users.xml editing through any editor and the tomcat server is started, the new entries are not available immediately for use unless we restart the server.
2. When we make updation of tomcat-users.xml using admin tool of tomcat the values are reflected in the in memory of the tomcat server (i.e. we can use those user details with restarting the tomcat server)

would like to know the mechanism admintool uses to update the in memory of tomcat server whenever there is a new entry of user/role/group in tomcat-users.xml.

Regards
Roshini
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
IF this was my problem I would download the Tomcat source code and start searching.
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi,

OK.

I will do analyse on the source .. any other inputs on this !! for easy reference would be of great help.

Thanx in advance.

Regards
Roshini.S
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In order to access the internals of Tomcat from within your web application, you need to set the 'privileged' attribute in your Context entry to "true".

Other than that, I think William's advice is the best you'll get.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Thank you Mr.Ben , i downloaded the source, I will search it.

Would like to know how tomcat maintains the user information across session and how its mapped with the web application using security-constraint tag of web.xml., any web links or tutorial would be of great help.


Regards
Roshini.S
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Security-constraints are driven by the Servlet Spec.
There is a link to the spec in my signature.

How a particular container implements the spec is up to the makers of the container. I don't know of any tutorials that explain the inner workings of Tomcat. I think the source code and the documentation on the Tomcat site will be your best bets.
http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Thank you Mr.Ben for your suggestion.

Regards
Roshini.S
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Update of Tomcat-users.xml by Tomcat Administration Tool
 
Similar Threads
Confirmation required about <security-role> element.
Web App Security
server.xml file
BASIC authentication not working
Access to Tomcat server has not been authorized.