• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Localhost Vs IP Address

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application. which takes the snap (using web camera) on the any network machine when i provide the ip address/username/password of that machine.(It uses JMF)

To access this application I provide http://ipaddress_of_server/ in my browser, In that case it works fine.

But when I work on the server and provide 'localhost' at the place of IP like http://localhost/ in my browser, The JMF (java media framework) part of that application doesnt work.

In short JMF part of the application only works when I provide the ip of the server in browser. If I use 'localhost' it doesn't work.

I'm not sure but I think some how this problem is because of RMI.

Can anybody tell me what may be the reason....

Thanks in Advance

--
Prateek Sharma
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think some how this problem is because of RMI.


Why do you think that? You mention a browser and JMF - where does RMI fit in?
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try 127.0.0.1 in place of localhost and domain-name of the machine in place of ip address of the server?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just learned about this stuff a couple days ago, so don't take what i'm saying as golden, but it might be something you haven't thought of.

do you remember setting any port numbers when installing your webserver? did you just install w/defaults?

try http://localhost:8080/

i know when i installed apache, it sets up port 8080 to take stuff in.

explanation (again, keep in mind i just learned this stuff so it might not be completely accurate):

whenever you see http://something you are automatically going to port 80 of that machine. so if you go http://yourServerIP/ it will boomerang a message out, which will come back into your port 80. If your ip is hosting server, then it takes incoming port 80 and sends it to whatever port you specified when installing your webserver. I hope that helps at least to point you in right direction.
 
get schwifty. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic