[
http://www.stripesframework.org/jira/browse/STS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter closed STS-112.
--------------------------
> FormTag doesn't always preappend the contextpath
> ------------------------------------------------
>
> Key: STS-112
> URL: http://www.stripesframework.org/jira/browse/STS-112
> Project: Stripes
> Issue Type: Bug
> Components: Tag Library
> Environment: Stripes 1.2
> Reporter: Jeppe Cramon
> Assignee: Tim Fennell
> Fix For: Release 1.2.1
>
>
> If you have a context path called "/system" and a url binding of
> "/systemController/view.action" and a Stripe form like this: <stripes:form
> action="/betchallenge/offer.action">, then the resulting url should have the
> contextpath preappended to the action value according to the 1.2 doc.
> However this doesn't happen due to the check in FormTag's setAction method,
> because the action path actually does contain the contextpath. A quick
> solution is to check if the action path contains the contextpath + "/", see
> below:
> public void setAction(String action) {
> this.actionWithoutContext = action;
> if (action.startsWith("/")) {
> HttpServletRequest request = (HttpServletRequest)
> getPageContext().getRequest();
> String contextPath = request.getContextPath();
> if (contextPath != null && !action.contains(contextPath+"/")) {
> action = contextPath + action;
> }
> }
> HttpServletResponse response = (HttpServletResponse)
> getPageContext().getResponse();
> set("action", response.encodeURL(action));
> }
> /Jeppe
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development