click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Rybin (JIRA)" <>
Subject [jira] Commented: (CLK-629) ExternalLink unexpected href behavior
Date Wed, 17 Feb 2010 20:24:27 GMT


Andrey Rybin commented on CLK-629:

>Finn Bock 
>I wouldn't want any modification made to a targetPath like "". It
should be used as href exactly as is. 

Don't be afraid ;-)

What I mean:

"If the redirect location begins with a "/" character the redirect location will be prefixed
with the web applications context path. For example if an application is deployed to the context
"mycorp" calling setRedirect("/customer/details.htm")  will redirect the request to: "/mycorp/customer/details.htm".

Same can apply to ExternalLink.

If target path == or  or foobar then it will be used
as is - without modifications.
But if target path starts with / then - it is of course on your server, 
but usually wrong: http://myserver/target_path 
instead of (right): http://myserver/servletcontextpath/target_path

You don't know usually servletcontextpath in your webApp (you should call getContextPath())
and i think you rarely need something in others webapps.

> ExternalLink unexpected href behavior
> -------------------------------------
>                 Key: CLK-629
>                 URL:
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>            Priority: Minor
> All (most of) links in Click are "context-aware" ;-) i.e.   /link will be converted to
> but 
> ExternalLink is different.
> It uses link (targetPath) "as is" without any modifications.
> It is unexpected behavior.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message