【问题标题】:url cleaning not working using urlRewriteFIlterurl 清理无法使用 urlRewriteFIlter
【发布时间】:2013-06-04 03:06:58
【问题描述】:
 <rule>
            <from>/admin/index/index.jsp</from>
            <to>/admin/index</to>
 </rule>





<outbound-rule>

        <from>/admin/index</from>
        <to>/admin/index/index.jsp</to>

    </outbound-rule>

我正在尝试将此网址“/admin/index/index.jsp”重写为“/admin/index”..但我猜它正在将其重定向到“/admin/index”,因为它说资源不能发现有什么问题我只想写“/admin/index/index.jsp”为“/admin/index”

【问题讨论】:

    标签: java jsp url-rewriting filter tuckey-urlrewrite-filter


    【解决方案1】:

    使用规则作为

    <rule>
        <from>/admin/index</from>
         <to>/admin/index/index.jsp</to>
    </rule>
    

    现在使用 path+"/admin/index+ 在 href 标签或你想指定 url 的地方 路径在哪里

    字符串路径 = request.getContextPath();

    会有用的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      • 1970-01-01
      • 2012-04-18
      • 2011-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多