我正在使用 struts 1 和 urlwrite (http://www.tukey.org/urlrewrite/),我有以下问题。我想更改一个动作的 url,当调用该新 url 时,应该执行该动作。为此,在 urlrewrite.xml 中编写了以下配置:
<rule>
<from>/users/create</from>
<to>%{context-path}/createUserAction\.do</to>
</rule>
<outbound-rule >
<from>/createUserAction\.do</from>
<to>/users/create</to>
</outbound-rule>
然后指向prepareCreateUserAction 的html:link 更改为/users/create。但是,然后它使用上面的规则,但它尝试在没有.do的情况下重定向操作名称(http://localhost:8008/myapp/createUserAction而不是http://localhost:8008/myapp/createUserAction.do) ,并且没有找到任何动作。
有谁知道如何解决这个问题?