关于jsp调用ejb出错的jsp程序如下

03-08-29 kangy
ysb_cx.jsp,放在C:\bea\user_projects\mydomain\applications\DefaultWebApp下:

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

猜你喜欢