You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Илья Нарыжный <ph...@ydn.ru> on 2011/11/11 11:06:23 UTC
Url.toAbsoluteString doesn't work correctly
Hello,
I have following code:
String fullPath = url.toAbsoluteString();
String subPath = url.toString();
log.info("FULL: "+fullPath+" SUBPATH: "+subPath);
And after execution on the page in logs I see following:
13:00:08,751 INFO [STDOUT] INFO - TestPanel - FULL: /login
SUBPATH: login
So, it seems that "toAbsoluteString" works incorrect, because according to
documentation:
/**
* render full representation of url (including protocol, host and
port) into string
* representation
*
* @return absolute representation of the url
*/
Thanks,
Ilia
Re: Url.toAbsoluteString doesn't work correctly
Posted by Igor Vaynberg <ig...@gmail.com>.
WICKET-4220 for more details...
-igor
On Fri, Nov 11, 2011 at 2:29 AM, Bert <ta...@gmail.com> wrote:
> you can try RequestUtils.toAbsolutePath(fullPath);
>
> But this appears to have it on problems. E.g. for a page mounted under
>
> /login/callback
>
> you would get http//:host:port/login/login/callback
>
> Bert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Url.toAbsoluteString doesn't work correctly
Posted by Bert <ta...@gmail.com>.
you can try RequestUtils.toAbsolutePath(fullPath);
But this appears to have it on problems. E.g. for a page mounted under
/login/callback
you would get http//:host:port/login/login/callback
Bert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Url.toAbsoluteString doesn't work correctly
Posted by Martin Grigorov <mg...@apache.org>.
https://issues.apache.org/jira/browse/WICKET-4108
I'm also interested in this topic :-)
On Fri, Nov 11, 2011 at 12:06 PM, Илья Нарыжный <ph...@ydn.ru> wrote:
> Hello,
>
> I have following code:
>
> String fullPath = url.toAbsoluteString();
> String subPath = url.toString();
> log.info("FULL: "+fullPath+" SUBPATH: "+subPath);
>
> And after execution on the page in logs I see following:
>
> 13:00:08,751 INFO [STDOUT] INFO - TestPanel - FULL: /login
> SUBPATH: login
>
> So, it seems that "toAbsoluteString" works incorrect, because according to
> documentation:
>
> /**
> * render full representation of url (including protocol, host and
> port) into string
> * representation
> *
> * @return absolute representation of the url
> */
>
> Thanks,
>
> Ilia
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org