您的位置:首页 > 编程语言 > Java开发

ssh2整合问题

2012-08-21 22:50 253 查看
1、ssh2整合完毕后访问页面报错:

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中:

    <filter>

        <filter-name>struts2</filter-name>

        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

    </filter>

    <filter-mapping>

        <filter-name>struts2</filter-name>

        <url-pattern>/*</url-pattern>

   </filter-mapping>

关键点:<url-pattern>中一定要是/*
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ssh struts filter servlet tags