You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/01/29 22:50:08 UTC
DO NOT REPLY [Bug 16565] New: -
Incorrect path returned by getActionMappingName due to filename extension stripping
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16565>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16565
Incorrect path returned by getActionMappingName due to filename extension stripping
Summary: Incorrect path returned by getActionMappingName due to
filename extension stripping
Product: Struts
Version: 1.1 Beta 3
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Utilities
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: jpl@remotejava.com
The API documentation for RequestUtils.getActionMappingName states that the filename extension is stripped automatically. This method is used to process the value provided as the 'action' attribute of the html:form tag.
This causes problems in a configuration where the ActionServlet is mapped to a path prefix, for example /app/*, and action paths themselves include the dot character. For example: <action path="/login.html" type="org.apache.struts.actions.ForwardAction" parameter="/WEB-INF/page/login.jsp"/>
The inclusion of the ".html" extension in action names together with a prefix mapping for ActionServlet is useful to make dynamic pages appear "normal", "static" and "technology-neutral" to users, and search engines alike. If the behavior of RequestUtils.getActionMappingName could be altered (with a configuration parameter?) to not strip the extension, the problem with using such action paths in forms, and possibly other circumstances where this method is invoked, would be solved.
A currently applicable workaround involves putting an additional dot after the action path in the html:form element, i.e. <html:form action="/login.html." /> which is confusing and silly.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org