Wicket: Relative to absolute URL or get base URL

Posted by Gilean on Stack Overflow See other posts from Stack Overflow or by Gilean
Published on 2010-04-12T04:07:53Z Indexed on 2010/04/12 4:13 UTC
Read the original article Hit count: 421

Filed under:
|
|

If I have a relative path to a static asset (flash/blah.swf), what is the best way to convert this to an absolute URL (http://localhost/app/flash/blah.swf)? Or what is the best way to get the base URL of the Wicket application? I've tried using RequestUtils.toAbsolutePath but it doesn't seem to work reliably and is frequently throwing exceptions.

© Stack Overflow or respective owner

Related posts about wicket

Related posts about java