what is incorrect about those URLs? they are relative - relative to the path you are on.
-- Jeremy Thomerson http://www.wickettraining.com On Fri, Sep 11, 2009 at 10:14 AM, Dima Rzhevskiy <[email protected]>wrote: > Hi ! > > I create simple page X1 with AjaxLink : > .. > new AjaxLink("message"){ > @Override > public void onClick(AjaxRequestTarget ajaxRequestTarget) { > CharSequence url = > getRequestCycle().urlFor(X1.class, new PageParameters()); > String url2= > RequestUtils.toAbsolutePath(url.toString()); > LOG.info("url="+url); > LOG.info("url2="+url2); > } > } > ... > if I mount page to first level directory , for example "/x1.html" > result is correct: > url=x1.html > url2=http://localhost:8080/ctx/x1.html > > if I mount page to second level directory "/x1/x2.html" result incorrect > url=../x1/x2.html > url2=http://localhost:8080/x1/x2.html > > if i mount ti third level directory "/x1/x2/x3.html" > url=../../x1/x2/x3.html > url2=http://x1/x2/x3.html > > Is this bug or I use API incorrectly ? > > -- > > Rzhevskiy Dmitry >
