You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Brian Nielsen <br...@sweetxml.org> on 2004/10/04 21:01:21 UTC

How to handle paths for certificates in a webapp

Hey WSS4J

Great work, hopefully the documentation will soon catch up to the level of the code. I've used some time reading Package.html and fiddeling with the diffenrent parameters, but one thing has struck me as akward, maybe I'm just a rookie. 

When i deploy a webapp with axis/wss4j i can't use relative paths in my properties files, or I can but then I have to start Tomcat from the same directory each time, and learning from several mistakes I now use full paths. That on the other hand is not very elegant, since one of the points in using wss4j is that I do not have to be the admin of the container to have my webapp deployed (no new ssl connectors), but i would love to be able to hand over a war to my admin and be sure that it would run without references to the other parts of the file system. So my half idea was, how should I change the code to have et rely on the webapp context (using ex. getRealPath) and place my certificates under ex. /myapp/WEB-INF/cert/myCert.p12.

Thanks 
/Brian



RE: How to handle paths for certificates in a webapp

Posted by Brian Nielsen <br...@sweetxml.org>.
Thanx for a very quick reply - it does the job nicely.

Best regards 

Brian






-----Original Message-----
From: Werner Dittmann [mailto:Werner.Dittmann@t-online.de] 
Sent: Monday, October 04, 2004 10:15 PM
To: Brian Nielsen
Cc: fx-dev@ws.apache.org
Subject: Re: How to handle paths for certificates in a webapp


Brian,

good point...as always the documentation lacks some important info. The crypto implementation (this resolves the path to the keystore file, eg. myCert.p12) is able to locate this file via the classloader, i.e. you may place this file somewhere in your classpath. Just give it a try. If the file couldn't found in the classpath the implementation fails back to a filesystem lookup.

Regards,
Werner

Brian Nielsen wrote:
> Hey WSS4J
> 
> Great work, hopefully the documentation will soon catch up to the 
> level of the code. I've used some time reading Package.html and fiddeling with the diffenrent parameters, but one thing has struck me as akward, maybe I'm just a rookie.
> 
> When i deploy a webapp with axis/wss4j i can't use relative paths in 
> my properties files, or I can but then I have to start Tomcat from the 
> same directory each time, and learning from several mistakes I now use 
> full paths. That on the other hand is not very elegant, since one of 
> the points in using wss4j is that I do not have to be the admin of the 
> container to have my webapp deployed (no new ssl connectors), but i 
> would love to be able to hand over a war to my admin and be sure that 
> it would run without references to the other parts of the file system. 
> So my half idea was, how should I change the code to have et rely on 
> the webapp context (using ex. getRealPath) and place my certificates 
> under ex. /myapp/WEB-INF/cert/myCert.p12.
> 
> Thanks
> /Brian
> 
> 
> 



Re: How to handle paths for certificates in a webapp

Posted by Werner Dittmann <We...@t-online.de>.
Brian,

good point...as always the documentation lacks some important info.
The crypto implementation (this resolves the path to the keystore
file, eg. myCert.p12) is able to locate this file via the classloader,
i.e. you may place this file somewhere in your classpath. Just give
it a try. If the file couldn't found in the classpath the implementation
fails back to a filesystem lookup.

Regards,
Werner

Brian Nielsen wrote:
> Hey WSS4J
> 
> Great work, hopefully the documentation will soon catch up to the level of the code. I've used some time reading Package.html and fiddeling with the diffenrent parameters, but one thing has struck me as akward, maybe I'm just a rookie. 
> 
> When i deploy a webapp with axis/wss4j i can't use relative paths in my properties files, or I can but then I have to start Tomcat from the same directory each time, and learning from several mistakes I now use full paths. That on the other hand is not very elegant, since one of the points in using wss4j is that I do not have to be the admin of the container to have my webapp deployed (no new ssl connectors), but i would love to be able to hand over a war to my admin and be sure that it would run without references to the other parts of the file system. So my half idea was, how should I change the code to have et rely on the webapp context (using ex. getRealPath) and place my certificates under ex. /myapp/WEB-INF/cert/myCert.p12.
> 
> Thanks 
> /Brian
> 
> 
>