By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

"Access denied" in loading xml file.

P: n/a
Hi there,

I have this problem which is really driving me nuts for a couple of
days. Glad if any help or suggestion is given

Javascript will give me a pop-up error "Access is denied" when i try to
load a simple xml file, which is in the server machine itself. The
script is within a JSP page running apache tom-cat. I am running it with
IE6 from an windows administrative acc straight on the server so there
shouldn't be any access prob.

Code is something like that:

<script language="javascript>
var xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async = false;
xml.load("C:/Documents and Settings/Desktop/BTBT/abc.xml)

// upon the load statement; javascript will prompt error and jsp dies
off

</script>

My instinct is that Apache Tom-cat is prohibiting the access. The jsp is
unable to load any xml files in all location, but is able to load files
within the Tom-cat application folder.
(C:\jakarta-tomcat-4.0.1\webapps\..) I am however unsure where to
investigate further.

This is really driving me crazy. any advice is really welcomed.

Thks in advance
Darren

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 11 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Darren,

This is probably not the best group to post this to. I am wondering about
what you are doing. Am I correct that the java script you posted is part of
the returned page and runs in the browser? It appears so, since I don't
think JSP can process java script and if it did, then I still doubt that it
would support the "new ActiveXObject" statement. If you are really talking
about Java script running in the browser, then it's irrelevant which kind of
web server, and page generation mechanism is actually creating the page.
Client side java script simply has no access to the file system (you might
be able if you change some security settings in IE6, but that's nothing you
should expect any clients/customers to do).

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Darren Lew" <da*******@yahoo.com.sg> wrote in message
news:#S**************@tk2msftngp13.phx.gbl...
Hi there,

I have this problem which is really driving me nuts for a couple of
days. Glad if any help or suggestion is given

Javascript will give me a pop-up error "Access is denied" when i try to
load a simple xml file, which is in the server machine itself. The
script is within a JSP page running apache tom-cat. I am running it with
IE6 from an windows administrative acc straight on the server so there
shouldn't be any access prob.

Code is something like that:

<script language="javascript>
var xml = new ActiveXObject("Microsoft.XMLDOM");
xml.async = false;
xml.load("C:/Documents and Settings/Desktop/BTBT/abc.xml)

// upon the load statement; javascript will prompt error and jsp dies
off

</script>

My instinct is that Apache Tom-cat is prohibiting the access. The jsp is
unable to load any xml files in all location, but is able to load files
within the Tom-cat application folder.
(C:\jakarta-tomcat-4.0.1\webapps\..) I am however unsure where to
investigate further.

This is really driving me crazy. any advice is really welcomed.

Thks in advance
Darren

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.