URI absolutePath = null;
try
{
URL absolute = new URL(request.getRequestURL().toString());
UriBuilder builder = new UriBuilder();
builder.scheme(absolute.getProtocol());
builder.host(absolute.getHost());
builder.port(absolute.getPort());
builder.path(absolute.getPath());
builder.replaceQuery(null);
absolutePath = builder.build();
}
catch (MalformedURLException e)
{
throw new RuntimeException(e);
}