页面用struts2标签<s:actionerror/>后,页面访问异常! 带参提交页面现实正常!关键是无法直接访问!
一下是struts.xml里的内容<struts><packagename="struts"extends="struts-default"><actionname="r...
一下是struts.xml里的内容
<struts>
<package name="struts" extends="struts-default">
<action name="register" class="action.RegisterAction">
<result name="success">
show.jsp
</result>
<result name="input">
index.jsp
</result>
</action>
</package>
</struts>
以下是访问页面时的异常信息:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:25
22:
23: <body>i
24: This is Register JSP page. <br>
25: <s:actionerror/>
26: <form action="register.action">
27: Name:<input type="text" name="username"><br>
28: PWD:<input type="password" name="password"><br>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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]
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
org.apache.jsp.index_jsp._jspx_meth_s_actionerror_0(index_jsp.java:115)
org.apache.jsp.index_jsp._jspService(index_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 展开
<struts>
<package name="struts" extends="struts-default">
<action name="register" class="action.RegisterAction">
<result name="success">
show.jsp
</result>
<result name="input">
index.jsp
</result>
</action>
</package>
</struts>
以下是访问页面时的异常信息:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:25
22:
23: <body>i
24: This is Register JSP page. <br>
25: <s:actionerror/>
26: <form action="register.action">
27: Name:<input type="text" name="username"><br>
28: PWD:<input type="password" name="password"><br>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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]
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
org.apache.jsp.index_jsp._jspx_meth_s_actionerror_0(index_jsp.java:115)
org.apache.jsp.index_jsp._jspService(index_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 展开
1个回答
展开全部
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]
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]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询