• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

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

0
vrmetro
Asked:
vrmetro
  • 2
  • 2
1 Solution
 
Gibu GeorgeCTOCommented:
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
 
Gibu GeorgeCTOCommented:
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
 
vrmetroAuthor Commented:
I'll give it a whirl and let you know, thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now