My-Name-Is
My-Name-Is

Reputation: 4942

Where do I put the keystore file on JBoss AS 7.1

Where do I put the keystore file on JBoss AS 7.1 ?

If i put it into: %JBOSS_HOME%/standalone/configuration/ and reference it simply by:

<ssl key-alias="JBoss" password="JBo$$" certificate-key-file="/JBoss.keystore" cipher-suite="ALL" protocol="TLS"/>

I get an:

ERROR [org.apache.tomcat.util.net.jsse.JSSESocketFactory] (MSC service thread 1-1) Failed to load keystore type JKS with path JBoss.keystore due to JBoss.keystore (Das System kann die angegebene Datei nicht finden): java.io.FileNotFoundException: \JBoss.keystore (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open(Native Method) [rt.jar:1.7.0_10]

If I use an absoulute path for as reference to the keystore file, everything works fine. Is there a workaround so that I an use a relative path?

Upvotes: 3

Views: 15453

Answers (1)

Piotr Kochański
Piotr Kochański

Reputation: 22672

Use one of the predefined folder variables: jboss.home.dir, jboss.server.base.dir, jboss.server.config.dir, etc. for standalone configuration or jboss.domain.base.dir, jboss.domain.config.dir for managed domain (see full list).

Usage example: certificate-key-file="${jboss.server.config.dir}/JBoss.keystore" for a file copied to JBoss config folder.

Upvotes: 4

Related Questions