getRemoteHost() returns local loop back address not uri

Hello,

Not at all familar with JSP, but received some help previously setting up a switch between environments.  However the getRemoteHost() is returning the local loop back address rather than the URI.
if (request.getRemoteHost().equals("test.url.com:9021")) {*/
				// TEST
				DebugLog.write("Hostname Test:"+request.getRemoteHost()+FileNwline);
				db_host 			= "xxx";
				db_service_name 	= "xxx";
				stringZopeURL 	= "hxxx";
				stringTTWP 		= "https://select-test.worldpay.com/wcc/purchase";
			} else if (request.getRemoteHost().equals("staging.url.com")){

Open in new window

vrmetroAsked:
Who is Participating?
 
Gibu GeorgeConnect With a Mentor Chief Technology OfficerCommented:
If you are using windows machine

goto <Windows folder>\system32\drivers\etc\

open the hosts file and add the entry

127.0.0.1 <hostname you want to display>

save it

restart the server
0
 
Gibu GeorgeChief Technology OfficerCommented:
add 127.0.0.1 and the hostname you want to be returned to the hosts file
0
 
vrmetroAuthor Commented:
not sure what that means, again real new on JSP; mind an example?
0
 
vrmetroAuthor Commented:
I'll give it a whirl and let you know, thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.