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 2002/09/13 01:37:45 UTC
DO NOT REPLY [Bug 12600] New: -
html:form tag always prepends context path to action via getActionMappingURL
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=12600>.
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=12600
html:form tag always prepends context path to action via getActionMappingURL
Summary: html:form tag always prepends context path to action via
getActionMappingURL
Product: Struts
Version: 0.5 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: jtaylor@cobaltgroup.com
The getActionMappingURL method in FormTag.java always prepends the context to
an action and makes pure relative URL references impossible. Therefore, a
multi-tier architecture which maps "app-name.domain1.com/login.do"
to "domain2.com/app-name/login.do" cannot work with Struts form tags.
Why would you want to do such a thing, you ask? In some cases, it is
considered more secure to restrict access to a back-end servlet container
through a front-end web server via some sort of bridge. The bridge may further
shield the back-end server by mapping an app-specific domain to the back end
server's domain. That way access to applications can be managed on the
network/firewall level in addition to container and application levels. The
key to this strategy is avoiding absolute URL references.
Always including the context path in the action attribute of the html:form tag
makes such an architecture impossible without subclassing the off-the-shelf
Struts 1.1b2 version of FormTag.java. Perhaps the prepending of the context
could be optional depending on a boolean attribute of <html:form>,
e.g., "<html:form action=/foo relative=true>". As an aside, as far as I can
tell, it's not really necessary to include the context path since "foo.do" is
resolved to "/app-name/foo.do" within the "app-name" context. What's the
reason context is always pre-pended?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>