It's not a secret anymore!
The moose likes Servlets and the fly likes executing Servlet using AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "executing Servlet using AJAX" Watch "executing Servlet using AJAX" New topic

executing Servlet using AJAX

Kaushal Pandya

Joined: Feb 15, 2006
Posts: 9
Hi friend,

currently i am in urgent need of a solution for my problem which I am facing since last one week. My requirement is, I have three drop down menus these menus are inter-related. when I selects first one, second one should automatically get populated upon the value selected in first one. same for thired one too... it depands upone the selected value in first and second.

I tried AJAX for this. but I am not able to execute servlet file for the same. I am getting AJAX status=404 that is 'Page Not Found' error. I did everything possible to overcome. I set the classpath exclusivly for the location where this file is located. File is located on <root drive>:\tomcat\webapps\<Application Name>\Activities\

Please find the code....

and the servlet is

Please provide me a fisible solution as soon as possible....

I am waiting guys...

Kaushal Pandya
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
404 that is 'Page Not Found' error.

Your AJAX request is not using a URL that maps to a servlet or any other resource, its that simple.

Take the URL string and paste it in a browser, if it gets a 404 then you have to change either the URL or the way the server maps the url to a servlet.

Classpath has nothing to do with it

Did you expect something magic to happen here?

I think you better step away from this project and get a simple servlet working first, learn how web.xml works to map servlets to urls. Then you might get somewhere.

I agree. Here's the link:
subject: executing Servlet using AJAX
It's not a secret anymore!