Direction.isOutbound when true?

Splash Forums Rewrite Users Direction.isOutbound when true?

This topic contains 2 replies, has 2 voices, and was last updated by  anderskristian 7 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #26592


    I have made the demo sample ExampleConfigurationProvider

    Configuration res;
    res = ConfigurationBuilder.begin()
    return res;
    And it works perfect when I enter pig.html I get the horse.html

    Now I have tried almost everything like…
    .perform(httpOperation()) // httpOperation is a local HttpOperation that print “hello”

    Issue: The rule is NEVER NEVER NEVER triggere ???
    Event when it is the only rule… If I add httpOperation() to any sample (using .and(…))
    the only event is InboundRewrite…

    I have searched the entire source code base, I see no test I understand..
    I would very much like a sample that presents the meaning of Direction.isOutbound 🙂


    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. 😉



    Thanks a lot Christian..
    Yes I now understand that it is HttpServletResponse.encodeURL() that is intercepted an basis for Outbound
    I made a small JSP file and used statement:

    <a href="<%=response.encodeURL("index.html")%>">back</a>

    BINGO .. Outbound was triggered

    I must grant that I am not using HttpServletResponse.encodeURL() 😉


Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Rewrite Users’ is closed to new topics and replies.

Comments are closed.