關於jsp呼叫ejb出錯的jsp程式如下

kangy發表於2003-08-29
ysb_cx.jsp,放在C:\bea\user_projects\mydomain\applications\DefaultWebApp下:

<BR><%@ page contentType="text/html; charset=GBK" %><BR><%@ page import="javax.naming.*"%><BR><%@ page import="javax.rmi.PortableRemoteObject"%><BR><%@ page import="com.ctais.ejb.*"%><BR> <BR><%<BR> InitialContext ctx = new InitialContext();<BR> Object ref = ctx.lookup("NSSB/ElecDecrBean");<BR> ElecDecrHome home;<BR> home=(ElecDecrHome)PortableRemoteObject.narrow(ref,ElecDecrHome.class);<BR> <BR> ElecDecrRemote remote=home.create();<BR> long ysb_num=remote.getDecrPayerNum0(200306);<BR> out.print(ysb_num);<B

相關文章