You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2016/07/05 07:33:11 UTC

[jira] [Updated] (WW-4656) Wildcard redirect and path /static/

     [ https://issues.apache.org/jira/browse/WW-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-4656:
------------------------------
    Description: 
I do stumble over a new behaviour in Struts 2.5.

Working with:
{code:xml}
<action name="*">
  <result type="redirect">
    <param name="location">/home</param>
    <param name="namespace">/</param>
  </result>
</action>
{code}

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

  was:
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


> Wildcard redirect and path /static/
> -----------------------------------
>
>                 Key: WW-4656
>                 URL: https://issues.apache.org/jira/browse/WW-4656
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.5, 2.5.1
>            Reporter: Markus Fischer
>            Priority: Minor
>             Fix For: 2.5.2
>
>
> I do stumble over a new behaviour in Struts 2.5.
> Working with:
> {code:xml}
> <action name="*">
>   <result type="redirect">
>     <param name="location">/home</param>
>     <param name="namespace">/</param>
>   </result>
> </action>
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)