Url Rewrite Filter その2
うぇ、outbound-ruleでの表示用URL書き換えが、JSTLのc:urlでうまく使えないっす。
どうやら、outbound-ruleの動作ってのは、response.encodeURLを実行した際に
以下のようになるようにするというものらしいです。
to要素で設定した変換後URL= response.encodeURL(from要素に合致するURL);
んで、JSTLの方のソース(org.apache.taglibs.standard.tag.common.core.UrlSupport#doEndTag)を見てみますた。
// if the URL is relative, rewrite it if (!ImportSupport.isAbsoluteUrl(result)) { HttpServletResponse response = ((HttpServletResponse) pageContext.getResponse()); result = response.encodeURL(result); }
c:urlで変換しようとしているURLが相対pathになってないと、
response.encodeURLが実行されないので、outbound-ruleが正しく設定されていても意味がないということみたいです。
というわけで自己解決。