File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes 'localhost' tomcat server causes problems when communicating with external server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark " Watch " New topic
Author

'localhost' tomcat server causes problems when communicating with external server

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Hello,
i have a J2EE web application that communicates with an external server. my web app is run locally on my local test tomcat server and i access it through http://localhost:8080/MyApp
Now the external server asks me to provide a status_url pointing to a script (actually a servlet or a struts action) i construct this status_url as host:8080/MyApp/statusServlet and i handle the external server POST params in this statusServlet.

BUT when i tested my app on local server the status_url script (servlet) is never called!
one of my colleagues said
I think I know why your status_url is not being invoked. Basically, "localhost" is not universally addressable. Remember that this status_url should be accessible from the MB server - but localhost on the MB server refers to itself.

To make this work, you either need Dynamic DNS setup on your own local machine, or alternately provide the local external IP address for the status_url.

I think he might be right about this hint what do you think guys?
if localhost is the cause of the problem how i can resolve this? where can i find local external IP address for the status_url ? or is there any other clean method to test my app withthout localhost ?

any Ideas what could be the problem and how to solve it?

thank you much!
 
GeeCON Prague 2014
 
subject: 'localhost' tomcat server causes problems when communicating with external server