aspose file tools*
The moose likes Tomcat and the fly likes startup.bat is overwritting tomcat-users.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "startup.bat is overwritting tomcat-users.xml" Watch "startup.bat is overwritting tomcat-users.xml" New topic
Author

startup.bat is overwritting tomcat-users.xml

Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
I'm using apache-tomcat-5.5.26. I'm trying to add a new user with manager role, but each time I run startup.bat tomcat overwrites the tomcat-users.xml with this:



When you break the big rules, you get a lot of little rules.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
Tomcat does rewrite the users xml file every time it starts but normally that includes my modifications - do you suppose your modified xml has a syntax error?

How about possible parsing errors - anything in the logs?

Bill
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
It overwrites it even with the out-of-box version. Here is what it has originally:

Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
Here is my catalina log:



[ March 17, 2008: Message edited by: Matthew Snow ]
[ March 17, 2008: Message edited by: Matthew Snow ]
Matthew Snow
Ranch Hand

Joined: May 02, 2007
Posts: 82
Solved it. I had only extracted the core (apache-tomcat-5.5.26.zip). I extracted the admin package (apache-tomcat-5.5.26-admin.zip) on top of that and now it is keeping my changes.
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi Matthew,

I also has the same problem with Tomcat 6.0.16. But I can't find any admin package. Can you be more specific?


Thanks
Benson
Dave Mulligan
Greenhorn

Joined: Mar 14, 2003
Posts: 18
I had a similar, but different problem with Tomcat 6. Each time it started it would create a new tomcat-users.xml file with no content between the <tomcat-users> and the </tomcat-users> tag. After much wailing and gnashing of teeth and I spotted that all the content that I *thought* was in there was in fact commented out in the default file.

Ho hum. Hope this saves someone some time.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: startup.bat is overwritting tomcat-users.xml