How to get the full url from HttpServletRequest?

Tum

Ok, i have these codes:

HttpServletRequest httpRequest = (HttpServletRequest) request;
String requestQueryString = httpRequest.getQueryString();
System.out.println(requestQueryString);

When open the url "http://127.0.0.1:8888/MyProject.html?gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home",

it printed out:

 gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home

That url is missing the http://127.0.0.1:8888/MyProject.html? part.

How to fix it?

Alex Pakka

It would be

httpRequest.getRequestURL() + "?" + httpRequest.getQueryString()

prints

http://127.0.0.1:8888/MyProject.html?gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=home

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get the full url from HttpServletRequest?

From Dev

How to get full URL which contains # from HttpServletRequest

From Dev

How to get full url from django request

From Dev

How to get full url from dotnetnuke

From Dev

How to get the full url from a link

From Dev

How to get full url from dotnetnuke

From Dev

How to get full URL from compressed URL in Android?

From Dev

How can I get HttpServletRequest from ServletContext?

From Dev

How can I get HttpServletRequest from ServletContext?

From Dev

How to get only path from full url string

From Dev

How to get the full URL from deployed WAR file in a tomcat server

From Dev

How to get the full URL of the route?

From Java

How to get the full url in Express?

From Dev

How can I get the service from a `HttpServletRequest` in Tomcat 8

From Dev

Get reverse URL name from full path

From Dev

Get List Name from full url

From Dev

GET a full url from HTACCESS file

From Dev

Get reverse URL name from full path

From Dev

PHP get full url from two strings

From Dev

How to get the full URL for a request in Hapi

From Dev

How to get the full URL with the current path in Capybara

From Dev

How to get the full url in Hapi.Js?

From Dev

How to get full default route url?

From Dev

Seaside - how to get the full url while in a session

From Dev

How to get the full URL with the current path in Capybara

From Dev

How to get full html content of specific url?

From Dev

Get full url from shorten url using python

From Dev

How to get full video download from a link?

From Dev

How to get the full table html from Jquery?