I have an enrironment variable in tomcat which I configured in context.xml like so:
<Environment name="SMS_GATEWAY_PROPERTIES" value="${catalina.base}\conf\smsgateway.properties" type="java.lang.String"/>
I then use JNDI to read this variable like so:
Context ctx = new InitialContext();
ctx = (Context) ctx.lookup("java:comp/env");
String smsGatewayProperties = (String) ctx.lookup("SMS_GATEWAY_PROPERTIES");
Where can I put a similar configuration for JBoss 5.1
I tried adding it to "jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\context.xml", but JBoss doesn't like it.
Look here
http://www.datadisk.co.uk/html_docs/java_app/jboss5/jboss5_web_server.html
I think you need to modify your this value
value="${catalina.base}\conf\smsgateway.properties"