| Author |
help with an error message
|
J Derzaph
Greenhorn
Joined: May 29, 2008
Posts: 7
|
|
I'm not sure if this is the right catagory for this one or not but here goes: I'm trying to call a servlet with some javascript using XMLHttpRequest. the servlet is in the same domain but I'm getting this error: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) [Break on this error] req.open("GET", url, true); I understand this usually has to do with the same origin policy and accesssing other domains but the servlet is in the same domain here. Here is the code: The file structure looks like this: /Scottys/scripts.js -where the javascript is /Scottys/contract.html -where the script is called from /Scottys/servlets/autoSearchServlet -the servlet its trying to call
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Your web app structure looks wonky to begin with. Servlets need to be compiled and located in the hierarchy at WEB-INF/classes or in a jar file in WEB-INF/lib. Can you "hit" the servlet by typing its URL into the address bar? [ September 17, 2008: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
J Derzaph
Greenhorn
Joined: May 29, 2008
Posts: 7
|
|
Sorry, missed a couple of directories in there. The path for the servlet would be: Scottys/WEB-INF/classes/servlets the other two files are Scottys/WEB-INF/contract.html Scottys/WEB-INF/scripts.js and i can hit it using the url I think I may have found the problem though. I wasn't calling it from where I thought I was.
|
 |
 |
|
|
subject: help with an error message
|
|
|