和Application一样,采用JNDI进行定位访问:
1.部署,使用weblogic admin console或相关工具进行部署
2.jsp中
 ......
    Properties properties = new Properties();
    properties.put(Context.PROVIDER_URL,"t3://192.168.1.203:7001/");
properties.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    Context context = new InitialContext(properties);
    Object ref = context.lookup("StudentSess");
    StudentSessHome stuHome = (StudentSessHome) PortableRemoteObject.narrow(ref,StudentSessHome.class);
      StudentSess stuSess = stuHome.create();
      String ss = stuSess.getName();
  ......

解决方案 »

  1.   

    晕,我要的不是程序,我的程序已经写好了!
    我想知道一些相关路径的问题,我的jsp不能显示。
      

  2.   

    ejb是要部署的,用jb或weblogic或你自己改xml文件...
    难道你就只是拷贝过去吗 ?/???
    而且jar包有它的位置的.
    我的在我的应用目录下
      

  3.   

    我想知道一些相关路径的问题,我的jsp不能显示。----------------------
    可能你的web应用根本就没有起,写个简单的JSP程序能够显示吗?比如说hello world?