我正在开发一个portlet struts 2 ejb3 我配置了项目ejb,在portlet项目中我配置了动作类和struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package namespace="/view" extends="struts-portlet-default" name="view">
<!-- If no class attribute is specified the framework will assume success and
render the result index.jsp -->
<!-- If no name value for the result node is specified the success value is the default -->
<action name="index">
<result>/html/view/index.jsp</result>
</action>
<action name="create" method="ajouterOUmodifier" class="com.esprit.action.AdressAction">
<result name="success" type="redirect">index</result>
<result name="input">/html/view/ajoutAdress.jsp</result>
</action>
</package>
</struts>
和jsp文件
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html>
<head>
<link href="<s:url value="/resources/main.css"/>" rel="stylesheet" type="text/css"/>
</head>
<body>
<s:form action="create" method="post">
<s:textfield name="adress.nom" label="Firstname"/>
<s:textfield name="adress.prenom" label="Lastname"/>
<s:submit value="ok" />
</s:form>
</body>
</html>
但是当我执行项目时显示错误:
错误 [jsp:154] java.lang.ClassNotFoundException: com.esprit.metier.AdressDao 来自 BaseClassLoader@33b2c7a8{VFSClassLoaderPolicy@1e52011c{name=vfsfile:/D:/android/jboss-5.1.0.GA/server/default/ deploy/DepartmentWEB-portlet.war/ domain=ClassLoaderDomain@69ac5f83{name=vfsfile:/D:/android/jboss-5.1.0.GA/server/default/deploy/DepartmentWEB-portlet.war/ parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain @5183a17c{DefaultDomain}} 根=[MemoryContextHandler@432465105[路径=上下文=vfsmemory://5c4o13m-e9nqdk-h49ogxti-1-h49ohbp5-2a
你能帮助我吗 ?