struts的s表单提交异常
来源:互联网 发布:沪通铁路 知乎 编辑:程序博客网 时间:2024/05/16 01:26
IDE控制台输出的ERROR信息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]
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)
at org.apache.jsp.basicinfo.basicInfo_jsp._jspx_meth_struts_005fform_005f0(basicInfo_jsp.java:122)
at org.apache.jsp.basicinfo.basicInfo_jsp._jspService(basicInfo_jsp.java:93)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
web.xml相关配置如下:
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
config
struts-default.xml,struts-plugin.xml,/config/struts.xml
struts2
*.action
原因是因为过滤器只过滤action结尾的请求
但我在JSP页面中使用了 struts的tag标签
所以请求不会被struts的过滤器处理
标签也就无法解析
修改web.xml即可:
/*
- struts的s表单提交异常
- 防止页面表单重复提交,JSP页面加入 <s:token/> 以及Struts的相关配置详解
- struts对提交的表单进行验证
- 【Struts】表单的防止重复提交
- Struts分步表单提交
- struts表单提交问题
- struts练习-表单提交
- struts框架中多行表单提交
- struts框架中多行表单提交
- struts框架中多行表单提交
- STRUTS 跨页面表单提交
- struts 多行表单提交
- struts表单防止重复提交
- struts 防止表单重复提交
- struts防止表单重复提交
- Struts防止表单重复提交
- Struts防止表单重复提交
- 使用Struts的Token机制解决表单的重复提交
- PHP大批量插入数据库的3种方法和速度对比
- Tiled实现斜45度瓦片地图
- linux并发控制之完成量
- UI学习心得1
- 2014-09-23——Java Interface
- struts的s表单提交异常
- OpenCv实现两幅图像的拼接
- linux并发控制之互斥体
- 正则表达式-不包含某字符串
- C#操作XML之写入XML
- 快速产生测试数据
- Mysql net start mysql启动,提示发生系统错误 5 拒绝访问 解决之道
- FUSE简介(译)
- Undefined symbols for architecture i386:"_fwrite$UNIX2003"