You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Gary,Sheng (JIRA)" <ji...@apache.org> on 2012/09/18 03:29:07 UTC
[jira] [Created] (WW-3879) Lose context path when add params in
result node of struts.xml
Gary,Sheng created WW-3879:
------------------------------
Summary: Lose context path when add params in result node of struts.xml
Key: WW-3879
URL: https://issues.apache.org/jira/browse/WW-3879
Project: Struts 2
Issue Type: Bug
Components: Dispatch Filter
Affects Versions: 2.3.4.1
Environment: all struts release from old to 2.3.4
Reporter: Gary,Sheng
Fix For: Future
I add a parameter in result node like following:
<result name="success" type="redirectAction">
<param name="actionName">ViewData!default?sorterStr=${sorter}</param>
<param name="namespace">/admin</param>
</result>
sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewCertInfos!default.jspa?sorterStr=updated:desc
So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
private static boolean isPathUrl(String url)
{
// filter out "http:", "https:", "mailto:", "file:", "ftp:"
// since the only valid places for : in URL's is before the path specification
// either before the port, or after the protocol
return (url.indexOf(':') == -1);
}
I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3879) Lose context path when add params in
result node of struts.xml
Posted by "Gary,Sheng (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary,Sheng updated WW-3879:
---------------------------
Description:
I add a parameter in result node like following:
<result name="success" type="redirectAction">
<param name="actionName">ViewData!default?sorterStr=${sorter}</param>
<param name="namespace">/admin</param>
</result>
sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
private static boolean isPathUrl(String url)
{
// filter out "http:", "https:", "mailto:", "file:", "ftp:"
// since the only valid places for : in URL's is before the path specification
// either before the port, or after the protocol
return (url.indexOf(':') == -1);
}
I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
was:
I add a parameter in result node like following:
<result name="success" type="redirectAction">
<param name="actionName">ViewData!default?sorterStr=${sorter}</param>
<param name="namespace">/admin</param>
</result>
sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewCertInfos!default.jspa?sorterStr=updated:desc
So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
private static boolean isPathUrl(String url)
{
// filter out "http:", "https:", "mailto:", "file:", "ftp:"
// since the only valid places for : in URL's is before the path specification
// either before the port, or after the protocol
return (url.indexOf(':') == -1);
}
I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
> Lose context path when add params in result node of struts.xml
> --------------------------------------------------------------
>
> Key: WW-3879
> URL: https://issues.apache.org/jira/browse/WW-3879
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.3.4.1
> Environment: all struts release from old to 2.3.4
> Reporter: Gary,Sheng
> Fix For: Future
>
>
> I add a parameter in result node like following:
> <result name="success" type="redirectAction">
> <param name="actionName">ViewData!default?sorterStr=${sorter}</param>
> <param name="namespace">/admin</param>
> </result>
> sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
> So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
> private static boolean isPathUrl(String url)
> {
> // filter out "http:", "https:", "mailto:", "file:", "ftp:"
> // since the only valid places for : in URL's is before the path specification
> // either before the port, or after the protocol
> return (url.indexOf(':') == -1);
> }
> I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3879) Lose context path when add params in
result node of struts.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3879:
------------------------------
Fix Version/s: (was: Future)
2.3.5
> Lose context path when add params in result node of struts.xml
> --------------------------------------------------------------
>
> Key: WW-3879
> URL: https://issues.apache.org/jira/browse/WW-3879
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.3.4.1
> Environment: all struts release from old to 2.3.4
> Reporter: Gary,Sheng
> Fix For: 2.3.5
>
>
> I add a parameter in result node like following:
> {code}
> <result name="success" type="redirectAction">
> <param name="actionName">ViewData!default?sorterStr=${sorter}</param>
> <param name="namespace">/admin</param>
> </result>
> {code}
> sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
> So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
> {code}
> private static boolean isPathUrl(String url)
> {
> // filter out "http:", "https:", "mailto:", "file:", "ftp:"
> // since the only valid places for : in URL's is before the path specification
> // either before the port, or after the protocol
> return (url.indexOf(':') == -1);
> }
> {code}
> I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WW-3879) Lose context path when add params in
result node of struts.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart resolved WW-3879.
-------------------------------
Resolution: Fixed
Assignee: Lukasz Lenart
Solved, thanks for reporting!
> Lose context path when add params in result node of struts.xml
> --------------------------------------------------------------
>
> Key: WW-3879
> URL: https://issues.apache.org/jira/browse/WW-3879
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.3.4.1
> Environment: all struts release from old to 2.3.4
> Reporter: Gary,Sheng
> Assignee: Lukasz Lenart
> Fix For: 2.3.5
>
>
> I add a parameter in result node like following:
> {code}
> <result name="success" type="redirectAction">
> <param name="actionName">ViewData!default?sorterStr=${sorter}</param>
> <param name="namespace">/admin</param>
> </result>
> {code}
> sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
> So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
> {code}
> private static boolean isPathUrl(String url)
> {
> // filter out "http:", "https:", "mailto:", "file:", "ftp:"
> // since the only valid places for : in URL's is before the path specification
> // either before the port, or after the protocol
> return (url.indexOf(':') == -1);
> }
> {code}
> I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3879) Lose context path when add params in
result node of struts.xml
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464243#comment-13464243 ]
Hudson commented on WW-3879:
----------------------------
Integrated in Struts2 #534 (See [https://builds.apache.org/job/Struts2/534/])
WW-3879 Changes logic when the location is path and when full url address (Revision 1390692)
Result = FAILURE
lukaszlenart :
Files :
* /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletRedirectResult.java
* /struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java
> Lose context path when add params in result node of struts.xml
> --------------------------------------------------------------
>
> Key: WW-3879
> URL: https://issues.apache.org/jira/browse/WW-3879
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.3.4.1
> Environment: all struts release from old to 2.3.4
> Reporter: Gary,Sheng
> Assignee: Lukasz Lenart
> Fix For: 2.3.5
>
>
> I add a parameter in result node like following:
> {code}
> <result name="success" type="redirectAction">
> <param name="actionName">ViewData!default?sorterStr=${sorter}</param>
> <param name="namespace">/admin</param>
> </result>
> {code}
> sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
> So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
> {code}
> private static boolean isPathUrl(String url)
> {
> // filter out "http:", "https:", "mailto:", "file:", "ftp:"
> // since the only valid places for : in URL's is before the path specification
> // either before the port, or after the protocol
> return (url.indexOf(':') == -1);
> }
> {code}
> I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3879) Lose context path when add params in
result node of struts.xml
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3879:
------------------------------
Description:
I add a parameter in result node like following:
{code}
<result name="success" type="redirectAction">
<param name="actionName">ViewData!default?sorterStr=${sorter}</param>
<param name="namespace">/admin</param>
</result>
{code}
sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
{code}
private static boolean isPathUrl(String url)
{
// filter out "http:", "https:", "mailto:", "file:", "ftp:"
// since the only valid places for : in URL's is before the path specification
// either before the port, or after the protocol
return (url.indexOf(':') == -1);
}
{code}
I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
was:
I add a parameter in result node like following:
<result name="success" type="redirectAction">
<param name="actionName">ViewData!default?sorterStr=${sorter}</param>
<param name="namespace">/admin</param>
</result>
sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
private static boolean isPathUrl(String url)
{
// filter out "http:", "https:", "mailto:", "file:", "ftp:"
// since the only valid places for : in URL's is before the path specification
// either before the port, or after the protocol
return (url.indexOf(':') == -1);
}
I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
> Lose context path when add params in result node of struts.xml
> --------------------------------------------------------------
>
> Key: WW-3879
> URL: https://issues.apache.org/jira/browse/WW-3879
> Project: Struts 2
> Issue Type: Bug
> Components: Dispatch Filter
> Affects Versions: 2.3.4.1
> Environment: all struts release from old to 2.3.4
> Reporter: Gary,Sheng
> Fix For: 2.3.5
>
>
> I add a parameter in result node like following:
> {code}
> <result name="success" type="redirectAction">
> <param name="actionName">ViewData!default?sorterStr=${sorter}</param>
> <param name="namespace">/admin</param>
> </result>
> {code}
> sorter value in action is "updated:desc". After this action executed, I got a 404 error, and page address in IE is http://localhost:8080/admin/ViewData!default.jspa?sorterStr=updated:desc
> So the context path is missing. I dubug with struts source code and find the following method in org.apache.struts2.dispatcher.ServletRedirectResult:
> {code}
> private static boolean isPathUrl(String url)
> {
> // filter out "http:", "https:", "mailto:", "file:", "ftp:"
> // since the only valid places for : in URL's is before the path specification
> // either before the port, or after the protocol
> return (url.indexOf(':') == -1);
> }
> {code}
> I sugguest change return to url.substring(0,20).indexOf(':') == -1, this is better.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira