jQuery in Action, 2nd edition*
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Access Denied while accessing files present on same machine!
 
Similar Threads
Help Accessing Jboss on Solaris/Linux
Implementation of getServerName in web servers
Actionforward url
"case insensitive" url
accessing the local application through web browser