wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Access Denied while accessing files present on same machine! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Access Denied while accessing files present on same machine!" Watch "Access Denied while accessing files present on same machine!" New topic
Author

Access Denied while accessing files present on same machine!

Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Hello,

I usually run my application using this URL http://abc.mydomain.com/testApplication i.e using host name, if i have to run using IP, i use this URL http://10.0.0.1/testApplication. However when i use IP address, and try to access an html file whose location comes from the database as "http://abc.mydomain.com/testApplication/resource/test.html" . Javascript throws "Access Denied" error, which is not the case if i access my application using hostname. It looks like it is not able to resolve the hostname to IP address. Is this a cross domain issue? Do i have any workaround in case i want to make this work?

Thanks!


Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The domain has to match, you can not mix ip address and hostname.

Eric
Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Thank you Eric!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Access Denied while accessing files present on same machine!