Url.toAbsoluteString doesn't work correctly

2011-11-11 Thread Илья Нарыжный
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

2011-11-11 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-4108

I'm also interested in this topic :-)

On Fri, Nov 11, 2011 at 12:06 PM, Илья Нарыжный phan...@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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Url.toAbsoluteString doesn't work correctly

2011-11-11 Thread Bert
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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Url.toAbsoluteString doesn't work correctly

2011-11-11 Thread Igor Vaynberg
WICKET-4220 for more details...

-igor

On Fri, Nov 11, 2011 at 2:29 AM, Bert taser...@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-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org