Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1043

Loop redirect in error-page (404) with CLIENTWINDOW

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 1.5.3
    • JSF22-Module
    • None
    • Error page in web.xml and clientWindowMode and WildFly

    Description

      I have defined an error-page in web.xml to 404
      <error-page>
      <error-code>404</error-code>
      <location>/faces/page-not-found.xhtml</location>
      </error-page>

      But when I use CLIENTWINDOW it starts to redirects in loop from windowhandler.html

      As I've seen this happens because the dsrid param is lost after the container forward it to error page. So ClientSideWindowStrategy.getRequestTokenParameter always return null and send to windowhandler.html

      Attached a patch to simulate it in jsf-playground
      Patch: loop-redirect.patch
      After apply it. I ran with: mvn wildfly:run -P run-wildfly-8.0.0
      And opened http://localhost:8080/ds/not-found

      I've also attached an workaround that put dsrid param as attribute and lookup for it in ClientSideWindowStrategy
      I know it isn't the best way but I couldn't find another way to do that

      Attachments

        1. workaround.patch
          6 kB
          Janario Oliveira
        2. loop-redirect.patch
          2 kB
          Janario Oliveira

        Activity

          People

            tandraschko Thomas Andraschko
            janario Janario Oliveira
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: