[ http://mc4j.org/jira/browse/STS-158?page=comments#action_10966 ] 
            
Renaud Bruyeron commented on STS-158:
-------------------------------------


I agree with Jeppe: this is bug, in fact it is similar to STS-112 which was 
fixed.

Example:
contextPath = "/system"
UrlBinding = "/system/monitor.action"

then <stripes:link beanclass="x.y.z.MyActionBean"/> will write out <a 
href="/system/monitor.action"/> when in fact it should write out <a 
href="/system/system/monitor.action">...

I just spent 20mn trying to figure out why my links were broken. In this 
particular case, stripes should not try to be *too* smart ;-)

> LinkTag doesn't add contextpath if some part of the href contains the context 
> path
> ----------------------------------------------------------------------------------
>
>                 Key: STS-158
>                 URL: http://mc4j.org/jira/browse/STS-158
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.3
>         Environment: 1.3 Beta 1
>            Reporter: Jeppe Cramon
>         Assigned To: Tim Fennell
>             Fix For: Release 1.5
>
>
> Hi
> If the href in anyway contains the contextpath then the LinkTag wont 
> preappend the context path.
> Example: context path = "/user"
> href= 
> "/someurl/someaction.action?returnPage=/user/someurl2/someaction2.action"
> Since the test on doEndTag just checks with a contains() this will always 
> fail to preappend /user to the href:
> doEndTag code:
>             // Append the context path, but only if the user didn't already
>             if (originalHref.startsWith("/") && !"/".equals(contextPath)
>                     && !originalHref.contains(contextPath + "/")) {
>                 href = contextPath + href;
>             }
> /Jeppe

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to