You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by joe user <pa...@yahoo.com> on 2003/08/29 23:03:28 UTC
Asking the user for a password on startup
Hello Tomcat developers,
I have a class which needs to get a password typed in
on the console from a user for startup. This password
is used to access an encryption key so I don't want it
to be stored in web.xml, etc. I could create a web
application that accepts that password over the net,
but what I really want to do is to just allow the
administrator to type the password in when he runs
startup.sh.
One solution that I have is to have a class with a
static block that gets the password from the console.
That works fine (the password is requested when the
class is loaded) but it breaks the regular Tomcat
startup scripts. I modified the script so that it
does not background the java process, and then I hit
Ctl-Z and then background it, but what I'm wondering
is, is there a better way to do this?
Thanks!
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com