Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.1.Final
    • Fix Version/s: 7.1.0.Beta1
    • Component/s: Web
    • Labels:
      None

      Description

      I have tried to add the following configuration to the standalone.xml <virtual-server> node:

      <virtual-server name="default-host">
      <alias name="localhost"/>
      <alias name="example.com"/>
      <rewrite pattern="^/helloworld(.*)" substitution="/helloworld/test.jsp"/>
      </virtual-server>

      and I have deployed the helloworld.war, however the rewrite does not work (I know I can deploy war at the root context I just want to test the rewrite).

        Gliffy Diagrams

          Activity

          Hide
          scorcher14x Carl L added a comment - - edited

          I actually tested 7.0.2 and basic rules without condition tags are working for me, such as

          <virtual-server name="default-host" enable-welcome-root="true">
              <alias name="localhost"/>
              <alias name="example.com"/>
              <rewrite pattern="^(.*)/([\w\-]+)$" substitution="$1/$2.jsp"/>
          </virtual-server>
          

          which I used to test the appending of .jsp. So it's useful to me even without the full 7.1.0 fix.

          Show
          scorcher14x Carl L added a comment - - edited I actually tested 7.0.2 and basic rules without condition tags are working for me, such as <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> <rewrite pattern="^(.*)/([\w\-]+)$" substitution="$1/$2.jsp"/> </virtual-server> which I used to test the appending of .jsp. So it's useful to me even without the full 7.1.0 fix.
          Hide
          markus_s Markus Straub added a comment -

          I do not think that this bug is fixed completely:
          For me (using jboss-as-7.1.0.CR1b) rewrite patterns only work if enable-welcome-root is set to true!

          Show
          markus_s Markus Straub added a comment - I do not think that this bug is fixed completely: For me (using jboss-as-7.1.0.CR1b) rewrite patterns only work if enable-welcome-root is set to true!
          Hide
          rmaucher Remy Maucherat added a comment -

          If the request does not match a webapp when it comes in, then processing stops there (before going into the rewrite valve, or any valve at all actually).

          Show
          rmaucher Remy Maucherat added a comment - If the request does not match a webapp when it comes in, then processing stops there (before going into the rewrite valve, or any valve at all actually).
          Hide
          carlogo Carlos Go added a comment -

          Hello, I am using jboss EAP 6.x and I have configured the standalone.xml file as Carl L said with the helloworld.war attached and it does not work.

          Any other files to set? Any help?

          Many thanks in advance.

          Carlos.

          Show
          carlogo Carlos Go added a comment - Hello, I am using jboss EAP 6.x and I have configured the standalone.xml file as Carl L said with the helloworld.war attached and it does not work. Any other files to set? Any help? Many thanks in advance. Carlos.
          Hide
          scorcher14x Carl L added a comment - - edited

          Hi, Carlos. I've haven't tested in EAP but rewrite has been working fine for us with JBoss 7.1.1. We added flags="L" to our tag, but I'm not sure if that's significant in this case. Current rule:

          <rewrite pattern="^/(.*)/([\w\-]+)$" substitution="/$1/$2.jsp" flags="L"/>
          

          Show
          scorcher14x Carl L added a comment - - edited Hi, Carlos. I've haven't tested in EAP but rewrite has been working fine for us with JBoss 7.1.1. We added flags="L" to our tag, but I'm not sure if that's significant in this case. Current rule: <rewrite pattern="^/(.*)/([\w\-]+)$" substitution="/$1/$2.jsp" flags="L"/>

            People

            • Assignee:
              rmaucher Remy Maucherat
              Reporter:
              jefimm jefimm
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development