[
https://issues.apache.org/struts/browse/STR-2961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40133
]
Henri Yandell commented on STR-2961:
------------------------------------
It does seem to be virtually the same code with the exception of the empty
String check and a bit of design change. It's odd that it's not in the 1.4
version - that was created on 10th August 2003 and at that point the empty
check was in RequestProcessor, but it was not in the first version of
SelectAction. Randomness - I guess SelectAction was created from an older
version of the code than what was in CVS at that time.
Agreed on there being other parts that could be empty. I suspect we need to
change each '== null' for a private method that checks for null AND empty.
I'll attach a patch today so you can check it over.
> SelectAction getPath returns null when used with URL rewriting and breaks
> application
> -------------------------------------------------------------------------------------
>
> Key: STR-2961
> URL: https://issues.apache.org/struts/browse/STR-2961
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.5
> Environment: WebSphere Platform 6.0 [BASE 6.0.2.5 cf50549.21] r
> Reporter: Jill Nannizzi
> Fix For: 1.3.7
>
>
> When I run with URL rewriting enabled on my server I get
> InvalidPathException("No action config found for the specified url.". Here is
> the problem in SelectAction.getPath. The request.getPathInfo() returns an
> empty string and the test on path == null stops the 2 further attempts to get
> the servlet path. In the 1.2.4 RequestProcessor the statement
> "path = (String) request.getAttribute(INCLUDE_SERVLET_PATH);" is
> unconditional so the problem does not happen.
> Here is the code in SelectAction:
> if (path == null) {
> path = request.getPathInfo();
> }
> // For extension matching, match on the servlet path
> if (path == null) {
> path =
> (String) request.getAttribute(Constants.INCLUDE_SERVLET_PATH);
> if (path == null) {
> path = request.getServletPath();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.