* returns just the request uri to the error page without the query string
*/
@Test
public void wicket3599()
{
MockHttpServletRequest httpRequest = new MockHttpServletRequest(null, null, null);
httpRequest.setURL("/" + httpRequest.getContextPath() + "/request/Uri");
httpRequest.setParameter("some", "parameter");
ServletWebRequest webRequest = new ServletWebRequest(httpRequest, "/");
Url clientUrl = webRequest.getClientUrl();
Assert.assertEquals("request/Uri?some=parameter", clientUrl.toString());
// error dispatched
httpRequest.setAttribute("javax.servlet.error.request_uri", "/some/error/url");
ServletWebRequest errorWebRequest = new ServletWebRequest(httpRequest, "/");
Url errorClientUrl = errorWebRequest.getClientUrl();
Assert.assertEquals("/some/error/url", errorClientUrl.toString());
}