我正在開發一個portlet支柱2 EJB3 我配置項目和EJB的portlet項目我confugured動作類,並在struts.xml錯誤JSP 154 java.lang.classnotfound
<?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>
但是當我執行項目的誤差顯示:
ERROR [JSP:154]的java.lang。 ClassNotFoundException:來自BaseClassLoader @ 33b2c7a8的com.esprit.metier.AdressDao {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}} roots = [MemoryContextHandler @ 432465105 [路徑=背景= vfsmemory:// 5c4o13m-e9nqdk-h49ogxti-1-h49ohbp5-2a
你能幫助我嗎?
你的代碼真的像這樣隨機縮進?無論如何,我不確定我們在這一點上能夠提供什麼樣的幫助 - 這個班級在哪裏生活? – 2012-07-05 15:31:25