After searching online for quite some time, I cannot find a good way to edit users from within a JSP script besides opening tomcat-users.xml
and manually editing it. Not only is this a security vulnerability because I have to give the www user permissions to tomcat-users.xml
, but I have to restart Tomcat to see any effect, rendering any changes useless.
Since the deployment is entirely internal, I wouldn't be entirely against manually editing tomcat-users.xml
via the JSP. Editing Apache via an .htaccess
wrapper is out of the question (this was my original solution), as part of the application apparently depends on the Tomcat login.
Are there any better methods inherent to Tomcat to maintain users? I am using Tomcat 6.0.