You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <Fe...@day.com> on 2008/01/10 09:51:07 UTC
Re: svn commit: r610718 -
/incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java
Hi,
Am Donnerstag, den 10.01.2008, 08:39 +0000 schrieb cziegeler@apache.org:
> Add context path to links.
> ...
> - pw.print("<a href=\"" + page.getPath() + ".html\">");
> + pw.print("<a href=\"" + request.getContextPath() + page.getPath() + ".html\">");
Shouldn't this be handled by HttpServletResponse.encodeURL(String url) ?
Regards
Felix
Re: svn commit: r610718 - /incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/Navigation.java
Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger wrote:
> Hi,
>
> Am Donnerstag, den 10.01.2008, 08:39 +0000 schrieb cziegeler@apache.org:
>> Add context path to links.
>> ...
>> - pw.print("<a href=\"" + page.getPath() + ".html\">");
>> + pw.print("<a href=\"" + request.getContextPath() + page.getPath() + ".html\">");
>
> Shouldn't this be handled by HttpServletResponse.encodeURL(String url) ?
>
No, afaik, encodeURL() only handles apending the session id.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org