可能没有配置好,我的也是jbuilder7.0+weblogic7.0,运行正常
解决方案 »
- java如何获取网卡MAC、硬盘序列号、CPU ID
- rbac相关,望高手解答org.javawing.mvcframe是在那个jar包中....
- 求高手解决删除xml文件中的内容
- jap+servlet与SSH三大框架开发的系统
- TOMCAT的MBean描述文件放在哪里?
- 关于连接池关闭
- 新手问题:在Eclipse中怎样创建Struts Project?
- 写XML时出现异常,解析器为org.apache.crimson
- struts 文档,apache不提供下载,那里有下的?
- 我下载的日蚀(eclipse),为什么用不了呢,怎么弄啊??
- 服务器的win2000是中文版,客户端win2000是英文版,小应用程序输出是乱码?
- EJB+CMP模式下多主键数据保存不成功?
Class homeInterface = null;
if (homeInterfaceName != null) {
try {
homeInterface = Class.forName(homeInterfaceName);
} catch (ClassNotFoundException ex) {
}
} EJBHome home = null;
try {
Object homeObject = getInitialContext().lookup(homeName);
if (homeInterface == null) {
homeInterface = homeObject.getClass();
}
home = (EJBHome)PortableRemoteObject.narrow(homeObject, homeInterface);
} catch (NamingException ex) {
} Method homeMethod = home.getClass().getMethod("create", new Class[]{}); EJBObject remote = (EJBObject)homeMethod.invoke(home, new Object[]{});
List list = null;
if (remote instanceof ejbsample) {
list = ((ejbsample)remote).selectData(httpServletRequest);
}
httpServletRequest.setAttribute("result" ,list);
try {
// Get an InitialContext
String url = servletConfig.getInitParameter("EJBProviderURL");
String EJBInitialContextFactory = servletConfig.getInitParameter("EJBInitialContextFactory");
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, EJBInitialContextFactory);
h.put(Context.PROVIDER_URL, url);
return new InitialContext(h);
} catch (NamingException ne) {
throw ne;
}
}
<context-param>
<param-name>EJBProviderURL</param-name>
<param-value>http://localhost:7001</param-value>
<description>url</description>
</context-param>
<context-param>
<param-name>EJBInitialContextFactory</param-name>
<param-value>weblogic.jndi.WLInitialContextFactory</param-value>
<description>contextFactory</description>
</context-param>
<servlet>
<servlet-name>commonServlet</servlet-name>
<servlet-class>examples.servlets.CommonServlet</servlet-class>
<init-param>
<param-name>EJBProviderURL</param-name>
<param-value>http://localhost:7001</param-value>
</init-param>
<init-param>
<param-name>EJBInitialContextFactory</param-name>
<param-value>weblogic.jndi.WLInitialContextFactory</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>commonServlet</servlet-name>
<url-pattern>/commonServlet/*</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>
mytaglib
</taglib-uri>
<taglib-location>
/WEB-INF/taglib/MyTaglib.tld
</taglib-location>
</taglib></web-app>