> From: "Kenneth Jensen" <[EMAIL PROTECTED]>
> Sent: Friday, May 27, 2005 6:49 AM
> The ServletContext.getResource depends on a URL string from the
> request, as far as I can see, and I could not get it to work quickly,
> so I ended up wth this rather silly hack in the servlet init() method:
You
Thanks for both of your advices.
JNDI is probably the smart way of doing it, but I am not familiar with
it (beyond recognising the name and concept), and right now, the last
thing I need is another tech thing to worry about (finishing a student
project). :-)
The ServletContext.getResource depends
> From: Kenneth Jensen [mailto:[EMAIL PROTECTED]
> How do I get my servlet to read the keystore file, say if I put it in
> $CATAILNA_HOME/webapps//WEB-INF/lib/mykeystore.jks.
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResource(java.lang.String)
My preference is to rely on a JNDI lookup which will return a String. The
string is a URL which you can then open and then read from mykeystore.jks.
Then the JNDI lookup config would reside in the declaration. Then
its up to the admin to place mykeystore.jks anywhere they wish.
-Tim
Kenneth