JNDI Java 命名与目录接口
jsp
<% Context ctx = new InitialContext(); String jndiName = (String) ctx.lookup("java:comp/env/jndiName"); out.print(jndiName); %>
context.xml
<Environment name="jndiName" value="jndiValue" type="java.lang.String" />
jsp
<% Context ctx = new InitialContext(); String jndiName = (String) ctx.lookup("java:comp/env/jndiName"); out.print(jndiName); %>
context.xml
<Environment name="jndiName" value="jndiValue" type="java.lang.String" />