index.jsp
来自「《J2EE企业级应用开发》一书的配套源代码」· JSP 代码 · 共 43 行
JSP
43 行
<%@ page import="java.io.IOException,java.util.*,javax.naming.*,javax.servlet.*,javax.servlet.http.*,java.rmi.*,javax.rmi.PortableRemoteObject,javax.ejb.*,com.hellking.study.ejb.*" %>
<%
/**
* The bean JNDI name
*/
/**
* The Hello bean remote reference
*/
Hello hello;
/**
* @param beanJNDI bean where to send the message
*/
/**
* Helper to get the remote reference to the bean
*/
// Get Hello bean
Context context = new InitialContext();
HelloHome helloH = (HelloHome)context.lookup("ejb/TopicHello2");
hello = helloH.create();
/**
* Say hallo to the bean
*/
out.println("Saying hello");
hello.hello("Hellodslkfgjlkdajg;lksadjg;kdsj");
// HelloClient
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?