Struts2 org.apache.jasper.jaspereException:找不到Struts dispatcher
struts.xmlStruts2 org.apache.jasper.jaspereException:找不到Struts dispatcher,struts2,Struts2,struts.xml <action name="tohome" class="action.ToSmsAction" method="execute"> <result name="success">/pages/home.jsp</result> <result name="login">/pages/login.jsp</result> </action>
<action name="tohome" class="action.ToSmsAction" method="execute">
<result name="success">/pages/home.jsp</result>
<result name="login">/pages/login.jsp</result>
</action>
}
如果我没有包括class=“action.tosmAction”
,那么它工作得很好
但是当包括class=“action.tosmAction”
时,它会显示以下错误
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling
this request.
exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is
usually caused by using Struts tags without the associated filter. Struts tags are only
usable when the request has passed through its servlet filter, which initializes the
Struts dispatcher needed for this tag. - [unknown location]
root cause
The Struts dispatcher cannot be found. This is usually caused by using Struts tags
without the associated filter. Struts tags are only usable when the request has passed
through its servlet filter, which initializes the Struts dispatcher needed for this tag. -
[unknown location]
note The full stack traces of the exception and its root causes are available in the
GlassFish Server Open Source Edition 3.1.1 logs.
您需要提供额外的信息,主要是如何访问JSP页面。如果您直接访问JSP页面,并试图使用大多数S2标记,则会出现此错误。如果您阅读堆栈跟踪,它会告诉您发生此错误的大部分原因。要获得进一步帮助,您需要提供
Dave
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling
this request.
exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is
usually caused by using Struts tags without the associated filter. Struts tags are only
usable when the request has passed through its servlet filter, which initializes the
Struts dispatcher needed for this tag. - [unknown location]
root cause
The Struts dispatcher cannot be found. This is usually caused by using Struts tags
without the associated filter. Struts tags are only usable when the request has passed
through its servlet filter, which initializes the Struts dispatcher needed for this tag. -
[unknown location]
note The full stack traces of the exception and its root causes are available in the
GlassFish Server Open Source Edition 3.1.1 logs.