【发布时间】:2011-05-14 16:03:39
【问题描述】:
我想开始使用Struts 2框架,我下载Struts 2.2.3 ,并按照这个tutorial 做第一个例子,但是当我运行具有
的 index.jsp<%@ taglib prefix="s" uri="/struts-tags" %>
....
<p><a href="<s:url action='hello'/>">Hello World</a></p>
..
出现此异常:
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]
我没有在 web.xml 中指定任何过滤器,因为在我创建 Web 应用程序时没有创建 web.xml 文件?!只有 sun-web.xml 文件存在。
【问题讨论】: