<Context path="/path" docBase="localPath" ...... >
<parameter name="resource_name" value="resource_path">
</Context>
Using web.xml
<env-entry>Calling in java source code.
<env-entry-name>paramName</env-entry-name>
<env-entry-type>java.lang.String(or any type)</env-entry-type>
<env-entry-value>paramValue</env-entry-value>
</env-entry>
Context initCtx = new InitialContext();
String paramValue = (String) initCtx.lookup(paramName);
No comments:
Post a Comment