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.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:52)
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
org.apache.jsp.login_jsp._jspx_meth_s_005ftextfield_005f0(login_jsp.java:106)
org.apache.jsp.login_jsp._jspService(login_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
即使在页面中引入了uri也会出现上述异样,此时web.xml中
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
注意<url-pattern>这里一定要是 /*
分享到:
相关推荐
利用Struts 2标签创建ex3.jsp页面,此页面提交给tag.action,在structs.xml中配置这个action的转发视图为result.jsp在result.jsp页面中显示ex3.jsp页面控件的值。(源代码和实验报告)
Java struts2 ongl 标签的详细在jsp页面的介绍
jsp中struts2.0标签应用示例,介绍了部分标签的使用,里面有详细的文档说明。
Struts2资源文件在jsp页面中显示乱码解决
比较完整的jsp Struts2标签。有助于java的学习。
struts2 标签 Taglib (Struts2标签库)
JSP_struts2标签大全
JSP_struts2标签大全
JSP_struts2标签大全,jsp struts javaee 标签
Struts2的标签库有一个巨大的改进之处,struts2标签库的标签不依赖于任何表现层技术,也就是说strtus2提供了大部分标签,可以在各种表现技术中使用。包括最常用的jsp页面,也可以说Velocity和FreeMarker等模板技术...
在页面中使用标签。 下面以一个自定义的分页标签为例,进行说明。 其实,开发自定义标签并不需要Struts2的支持,一般情况下,只需要继承javax.servlet.jsp.tagext.BodyTagSupport类,重写doStartTag,doEndTag等...
本资源使用jsp+hibernate+struts2完成简单的登录和注册,使用MySQL数据库,压缩包内有建表sql文件,资源仅供参考,勿进行商业用途
struts2+JSP +mysql 制作简单的界面
JSP Struts的HTML标签库详解
struts2 标签 国际化 文件上传 校验 拦截器 struts2.0的标签库(简介) 用过struts1.x的人都知道,标签库有html、bean、logic、tiles, 而struts2.0里的标签却没有分类,只用在jsp头文件加上 ...
使用struts2处理前后台的数据,并且在jsp页面使用json和dom树显示数据的完全源代码
很好的页面 希望大家下载