⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interceptortest.jsp

📁 一个EJB开发实例
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="com.foshanshop.ejb3.HelloChinaRemote, javax.naming.*, java.util.Properties"%>
<%
		Properties props = new Properties();
		props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
		props.setProperty("java.naming.provider.url", "localhost:1099");
		props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");	

		InitialContext ctx;
		try {
			ctx = new InitialContext(props);
			HelloChinaRemote hellochinaremote = (HelloChinaRemote) ctx.lookup("HelloChinaBean/remote");
			out.println(hellochinaremote.SayHello("佛山人"));
			out.println("<br>"+ hellochinaremote.Myname());
		} catch (NamingException e) {
			out.println(e.getMessage());
		}
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -