<%@ page import="com.hohai.juncao.*, javax.naming.*"%> 
<%!
	private HelloHome helloHome = null ;
	private Hello hello = null ;
	public void jspInit()
	{
		try {
			InitialContext initialContext = new InitialContext( ) ;
			helloHome = ( HelloHome )initialContext.lookup( "java:comp/env/HelloRefName" ) ;
			hello = helloHome.create( ) ;
		} catch( Exception ex ) {
			ex.printStackTrace( ) ;
		}
	}

	public void jspDestroy( )
	{
		hello = null ;
		helloHome = null ;
	}
%>

<html>
	<head>
		<title>Hello World!</title>
	</head>

	<body bgcolor="white">
		<%
			String message = hello.say( ) ;
		%>
		<center><h1><%= message %></h1></center>
	</body>
</html>
