Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4656

Wildcard redirect and path /static/

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.5, 2.5.1
    • 2.5.2
    • None
    • None

    Description

      I do stumble over a new behaviour in Struts 2.5.

      Working with:

      <action name="*">
        <result type="redirect">
          <param name="location">/home</param>
          <param name="namespace">/</param>
        </result>
      </action>
      

      To catch/redirect unknown request to the home page, the following requests will not be processed:

      https://localhost:8443/myApp/static/whatever

      The path /static/ seems to trigger a "special" behaviour since Struts 2.5?

      There is also an inconsistency between:

      https://localhost:8443/myApp/whatever/ (correct 404)
      https://localhost:8443/myApp/static/ (empty white page)

      Why is the path /static/ treated differently, and where is the exact class responsible for this?

      Thanks for considering.

      Markus

      Attachments

        Activity

          People

            Unassigned Unassigned
            flyingfischer Markus Fischer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: