[错误为:
java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [updatePAction]
java.lang.ClassNotFoundException: updatePAction
配置为:
struts.xml<action name="updatePStudent" class="updatePAction">
<result >updateStudentAction.action</result>
</action>
<action name="updateStudentAction" class="updateStudentAction">
<result type="redirect">/listStudent.action</result>
<result name="input">/update.jsp</result>
</action> list.jsp <s:iterator value="#request.list" id="us" >
<tr>
<td><s:property value="#us.id"/></td>
<td><s:property value="#us.name"/></td>
<td><s:property value="#us.password"/></td>
<td><s:property value="#us.age"/></td>
<td><s:a href="deleteStudent.action?student.id=%{#us.id}" onclick="return dell();" >delete</s:a></td>
<td><s:a href="updatePStudent.action?student.id=%{#us.id}">update</s:a></td>
</tr>
</s:iterator>
applicationContext.xml<bean id="updatePAction" class="action.updatePStudentAction" scope="prototype">
<property name="studentService" ref="studentService"/>
</bean>
<bean id="updateStudentAction" class="action.updateStudentAction" scope="prototype">
<property name="studentService" ref="studentService"/>
</bean>
java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [updatePAction]
java.lang.ClassNotFoundException: updatePAction
配置为:
struts.xml<action name="updatePStudent" class="updatePAction">
<result >updateStudentAction.action</result>
</action>
<action name="updateStudentAction" class="updateStudentAction">
<result type="redirect">/listStudent.action</result>
<result name="input">/update.jsp</result>
</action> list.jsp <s:iterator value="#request.list" id="us" >
<tr>
<td><s:property value="#us.id"/></td>
<td><s:property value="#us.name"/></td>
<td><s:property value="#us.password"/></td>
<td><s:property value="#us.age"/></td>
<td><s:a href="deleteStudent.action?student.id=%{#us.id}" onclick="return dell();" >delete</s:a></td>
<td><s:a href="updatePStudent.action?student.id=%{#us.id}">update</s:a></td>
</tr>
</s:iterator>
applicationContext.xml<bean id="updatePAction" class="action.updatePStudentAction" scope="prototype">
<property name="studentService" ref="studentService"/>
</bean>
<bean id="updateStudentAction" class="action.updateStudentAction" scope="prototype">
<property name="studentService" ref="studentService"/>
</bean>
解决方案 »
- 大家说,web qq 2是用什么开发的?
- 用Itext可以产生泰文的pdf?
- 客户管理系统 jsp
- 配置环境变量的困惑
- 新鸟请教。多谢!
- JNDI,通过连接池 lookup 的 javax.sql.DataSource 在整个应用程序中,是不是 loogup 一次,就可以?
- 问一个关于Tomcat日志的问题
- jtree 中如何让某些节点有条件的默认展开???急!!!拜过
- 如何在weblogic下把mysql的jdbc驱动安装进去?
- 求助nginx如何获取客户端的真实ip
- 急!在线等!!!在myeclipse下建的Dynamic Web Project在Run on Server时出错
- Timer 不知道为什么会挂起,是否和Timer在spring 环境下配置有关呢?
<property name="studentService" ref="studentService"/>
</bean>看看里面的class 的路径写对了没
<property name="studentService" ref="studentService"/>
</bean>
<bean id="updateStudentAction" class="action.updateStudentAction" scope="prototype">
<property name="studentService" ref="studentService"/>
</bean>我认为 一个service应该对应一个action吧 你的两个action对应的是一个service