<%@page contentType="text/html"%>
<html>
<head><title>jndi - custom resource sample</title></head>
<body>

<%@ page language="java" import="javax.naming.*,samples.jndi.customResource.*" %>

<%
     Context initContext = new InitialContext();
     Context envContext = (Context) initContext.lookup("java:comp/env");
     MyBean bean = (MyBean) envContext.lookup("bean/MyCustomConnectionFactory");
     String info = bean.getInfo();
 %>
 
The message from custom bean <h2><%=info%><h2>
</body>
</html>
