Brevsville Administrator wrote:
> Hi Gary
>
> It depends a little on what servlet runner you are using, but for instance
> with Apache JServ I simply put the properties file containing the
> initparameters, in a directory visible to the owner of the Jserv process.
>
> hth
>
Another approach works if your servlet engine is based on the servlet API
version 2.1 or later: initialize the database connection in a separate servlet,
and store it (or a connection pool object) as a servlet context attribute. That
way, the other servlets can use the connection without knowing what the password
was, because they can only see their *own* initialization parameters.
This doesn't protect you in Apache JServ because of the
ServletContext.getServlet() method, which has been deprecated in the later
versions of the servlet API.
>
> Chris
>
Craig McClanahan
>
> On Fri, 25 Aug 2000 08:11:32 GMT, Gary Choi wrote:
>
> >Hello,
> >
> >I use servlet to access the database and I use getinitParameter to obtain
> >the paramter for login the database. So I don't want anybody can
> >know the initParameter of the servlet except the admin.
> >Can anyone tell me is a secure to store the login parameter in the init
> >parameter of a servlet??
> >
> >Thanks a lot.
> >
> >Gary
> >________________________________________________________________________
> >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> >
> >___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html