Code example for URI

Methods: getFragmentgetPathgetQuerygetUserInfo

	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; 
Contextual code suggestions in your IDE  Get Codota for Java