<%@ page contentType="text/html";charset=GBK%>
<%@ page import="com.foshanshop.ejb3.HelloWorld,javax.naming.*,java.util.Properties"%>
<%
Properties props=new Properties();
props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");props.setProperty("java.naming.provide.url","localhost:1099");
try{ InitialContext ctx=new InitialContext(props);
HelloWorld helloworld=(HelloWorld)ctx.lookup("HelloWorldBean/remote");
out.println(helloworld.SayHello("中国人"));
}catch(NamingExceptiong e){
out.println(e.getMessage);}
%>
<%@ page import="com.foshanshop.ejb3.HelloWorld,javax.naming.*,java.util.Properties"%>
<%
Properties props=new Properties();
props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");props.setProperty("java.naming.provide.url","localhost:1099");
try{ InitialContext ctx=new InitialContext(props);
HelloWorld helloworld=(HelloWorld)ctx.lookup("HelloWorldBean/remote");
out.println(helloworld.SayHello("中国人"));
}catch(NamingExceptiong e){
out.println(e.getMessage);}
%>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货