当前位置: 代码迷 >> Java Web开发 >> struts2在struts.xml配置多个action时的有关问题
  详细解决方案

struts2在struts.xml配置多个action时的有关问题

热度:3940   发布时间:2013-02-25 21:20:08.0
struts2在struts.xml配置多个action时的问题
我想在一个struts.xml中配置多个action,这些action是在同一个包里的
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 name="logintest" namespace="/example" extends="struts-default">
  <action name="myuser" class="login.LoginAction" method="execute">
  <result name="success">/welcome.jsp</result>
  <result name="login">/login.jsp</result>
  </action>
   
   
  <action name="mycheck" class="login.CheckAction" method="execute">
  <result name="yes">/yes.jsp</result>
  <result name="no">/no.jsp</result>
  </action>
  </package> 
</struts>
只有第一个action可以访问,第二个就访问不了了,500错误
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

第一个action的url:http://localhost:8099/mystruts2/example/myuser
第二个action的url:http://localhost:8099/mystruts2/example/mycheck

各位高手指点一下,在同一个package配置多个action需要注意些什么


------解决方案--------------------------------------------------------
很明显是程序的问题,异常信息不会只这么点吧,把后面的都贴出来啊。
------解决方案--------------------------------------------------------
探讨
引用:

引用:

引用:

很明显是程序的问题,异常信息不会只这么点吧,把后面的都贴出来啊。


http://127.0.0.1:8099/mystruts2/example/mycheck.action

root cause

java.lang.NoSuchMethodError: javax.servlet.js……

------解决方案--------------------------------------------------------
探讨

引用:

引用:

很明显是程序的问题,异常信息不会只这么点吧,把后面的都贴出来啊。


http://127.0.0.1:8099/mystruts2/example/mycheck.action

root cause

java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.Tag……
  相关解决方案