转: 某个异常
来源:互联网 发布:阿里云网站接入 编辑:程序博客网 时间:2024/06/06 04:10
Struts2.0的异常收藏
异常信息: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.
环境:tomcat5.5.0
struts.xml信息
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <filter>
- <filter-name>struts2</filter-name>
- <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>struts2</filter-name>
- <url-pattern>*.action</url-pattern>
- </filter-mapping>
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
- </web-app>
struts.xml 信息:
SayHello.jsp 异常分析:以上的配置及文件中,如果采用 http://ip:port/SayHello.jsp,那么会出现前面所提到的异常。如果采用http://ip:port/SayHello.action 进行访问,那么正常。 原因:如果想要在jsp文件中,采用 struts的tag,那么必须通过web.xml所配置的过滤器访问文件,否则会有异常,即 之前所出现的异常。 解决方案: 方案一: 采用 http://ip:port/SayHello.action 访问 方案二: 将web.xml 的过滤器,从 *.action 修改为: /* 方案三: 修改SayHello.jsp 文件,不使用 struts 的标签。
- 转: 某个异常
- 遇到异常:这可能是由某个扩展导致的
- 遇到异常:这可能是由某个扩展导致的
- VS2010遇到异常,这可能是由某个扩展所致
- 某个控件删除后出现运行异常解决办法
- VS2012 异常 :遇到异常。这可能是由某个扩展导致的
- SpringMVC统一异常处理(返回异常数据而不是跳转到某个页面的方法)
- SpringMVC统一异常处理(返回异常数据而不是跳转到某个页面的方法)
- Visual Studio 遇到了异常,这可能是由某个扩展所致的
- Microsoft Visual Studio 2010 遇到了异常,可能是由某个扩展导致的......
- VS2010 “Visual Studio 遇到了异常。这可能是由某个扩展导致的。”解决方法
- Visual Studio 遇到了异常。这可能是由某个扩展导致的
- Visual Studio 遇到了异常。这可能是由某个扩展导致的。
- Visual Studio 遇到了异常。这可能是由某个扩展导致的。
- Visual Studio 遇到了异常。这可能是由某个扩展导致的。
- VS2010遇到了异常,可能是由某个扩展导致的
- Visual Studio 遇到了异常。这可能是由某个扩展导致的。
- Visual Studio 遇到了异常,这可能是由某个扩展所致...
- Mysql 备份还原和一些常用操作语句
- JAVA高级01_03 String类学习 2011-4-20
- Firefox直接打开PDF
- android: MapView加载多个 overlay 内存溢出
- 在ubuntu10.10下我按照以下步骤配置tftp
- 转: 某个异常
- hibernate的helloworld
- tomcat6中的内存设置问题
- varchar和nvachar区别
- C#实现打印与打印预览功能
- hibernate中的悲观锁和乐观锁
- CID 问题
- 64位编程-数据类型
- 判断String是否为空