Yes, changing the URLs of a rendered HTML page is possible using outbound rewrites.
However, this only works, if the URLs are passed through HttpServletResponse.encodeURL(). If the URLs are hardcoded in the HTML page, things are getting more difficult. To modify these URLs, you will have to buffer the response created by the Servlet and postprocess it. There is some support for this in Rewrite. Have a look at the rewrite-transform-* modules. They are used to (for example) minify JS and CSS files. This is basically the same thing as modifying parts of the HTML page. You will have to implement your own Transformer for this. Have a look at the showcase app for transformations for examples:
Thanks again Christian
I get it.
HttpServletResponse.encodeURL() must be used to enable outbound
I will try Transformer.
Actually Transformer could find links and parse them through HttpServletResponse.encodeURL() …
I will take a look
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Comments are closed.
Get updates from OCPSoft
If you find our tools useful, please consider making a donation to help us stay online and building software!