Code example for URI

Methods: getFragment, getPath, getQuery, getUserInfo

0
	} 
 
	@Override 
	protected HttpURI proxyHttpURI(HttpServletRequest request, String uri) throws MalformedURLException {
		try { 
			final URI requestURI = new URI(request.getRequestURI());
			final URI originalURI = new URI(request.getScheme(), requestURI.getUserInfo(), request.getServerName(), request.getLocalPort(), requestURI.getPath(), requestURI.getQuery(), requestURI.getFragment());
			final String proxiedURI = URIUtils.convert(originalURI).toPort(8080);
			return new HttpURI(proxiedURI);
		} catch (URISyntaxException e) {
			Logger.error("Failed to parse the requested URI", e);
		} 
		return null; 
	} 
 
}