2

I have 2 domains. http://sender.com/someServlet/ and http://receiver.com/someReceiver.

someServlet will POST some data to someReceiver. Flow is like below,

sender.com  -> Apache web server of receiver.com  -> Application server of receiver.com

I want to get the domain who is posting the data to receiver.com's someReceiver servlet.

Since, there is a Apache web server through which the request has to go through, when I execute below code in someReceiver servlet, I am getting the domain of receiver.com instead of sender.com.

request.getServerName();

This post tells to do configurations to support getServerName(); to return the actual sender's domain. Am not sure what configurations has to be done.

How can I get the actual domain who is posting the data?

Community
  • 1
  • 1
user2488578
  • 896
  • 4
  • 21
  • 40

0 Answers0