Some ActionBeans are not correctly mapped using clean URLs
----------------------------------------------------------
Key: STS-560
URL: http://www.stripesframework.org/jira/browse/STS-560
Project: Stripes
Issue Type: Bug
Components: ActionBean Dispatching
Affects Versions: Release 1.5
Reporter: Ben Gunter
Assignee: Ben Gunter
Priority: Critical
Fix For: Release 1.5
In the case of @UrlBinding("/search/{p}.action") the following URIs should be
able to map to SearchActionBean:
/search
/search.action
/search/1
/search/1.action
To support exact matches without relying on prefixes or suffixes in the URI,
UrlBindingFactory maps paths to ActionBeans in a map called pathCache so
ActionBeans can quickly be matched to a URI. If no match is found then it
iterates over the keys in prefixCache, checking if any of the known valid
prefixes match the beginning of the URI. In the case of the example binding
above, it caches /search as a valid path, but it does not cache the equally
valid /search.action. The path lookup fails to find a match in this case, and
so does the prefix scan because the only valid prefix is /search/.
This is an easy fix. There are two possible paths that need to be cached for a
UrlBinding: the prefix alone (/search) and if the suffix (.action) is not null
then prefix + suffix (/search.action).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development