Reply To: Direction.isOutbound when true?

Splash Forums Rewrite Users Direction.isOutbound when true? Reply To: Direction.isOutbound when true?

#26598

Inbound rewrites are applied when requests of a client hit the servlet engine. The inbound rewrite can then for example forward the request to another resource.

Outbound rewrites process the URLs when they written to the response during page rendering. To be more accurate, they are processed when URLs are processed by HttpServletResponse.encodeURL().

So if you have a raw URL like /faces/index.xhtml and you want to change it to /index, you typically have to do two things:

1. You must make sure that requests to /index are forwarded to /faces/index.xhtml. This is inbound rewriting.

2. Whenever a component like h:link renders /faces/index.xhtml to a HTML page, you have to modify it to /index. That is outbound rewriting.

Hope this helps. 😉