Hi All,
In case anyone wondered how to get an env-entry

<web-app>
  ....

  <env-entry>
    <description>Used to find a configuration file</description>
    <env-entry-name>configFile</env-entry-name>
    <env-entry-value>WEB-INF/eratex.xml</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
  </env-entry>

</web-app>

From JSP Page
<%
javax.naming.Context context = new javax.naming.InitialContext();
String filePath = (String)context.lookup("java:comp/env/configFile");
%>

<p>
File Path : <%= filePath %>
</p>

I was going to post a how do you ? ... but changed it into a how to!

Eric :-)

Reply via email to