Page navigation using rewrite

Splash Forums Rewrite Users Page navigation using rewrite

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 2 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #27127

    sujith ps

    I have my RewriteConfiguration class

    public class ApplicationConfigurationProvider extends HttpConfigurationProvider {
        public int priority() {
            return 0;
         * map URL with resource
        public Configuration getConfiguration(ServletContext context) {
            return ConfigurationBuilder.begin()

    My managedBean

    public class PageManagedBean {
        public String success(){
            return "success";

    In my page1.xhtml my submit button code is

    <h:commandButton action="#{myBean.success()}" id="nextButton" value="NEXT" >
        <f:param name="product" value="#{param.product}"></f:param>

    And my navigation rule in faces-config.xml is


    The problem is : When I am click on submit button from page1 , in the browser URL it is showing /page1/xyz even-though the page is redirected to page2

    The requirement is to change the url to /page2/xyz.

    I added <redirect/> in faces-config.xml , but in URL it is showing the full path of the page2 (/view/page2.jsf) .

    How can I redirect to next page with change in URL ?

    • This topic was modified 2 years ago by  sujith ps.
    • This topic was modified 2 years ago by  sujith ps.
    • This topic was modified 2 years ago by  sujith ps.

    Your join looks strange. You should not use query parameters in the to() part. Rewrite automatically converts all path parameters to query parameters.

    So instead of:


    You should try:


    Now your navigation should work. But please include the redirect element. That’s required for the URL to change.

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

You must be logged in to reply to this topic.

Comments are closed.