File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "executing Servlet using AJAX" Watch "executing Servlet using AJAX" New topic
Author

executing Servlet using AJAX

Kaushal Pandya
Greenhorn

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\AJAXGetSelect.java

Please find the code....



and the servlet is AJAXGetSelect.java



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

I am waiting guys...



Regards,
Kaushal Pandya
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
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.

Bill
 
Consider Paul's rocket mass heater.
 
subject: executing Servlet using AJAX
 
Similar Threads
Browser white screen with Ajax call
validation for Inetger type field in Struts
populate <html:options> with AJAX response
My AJAX Chained Selector Function (Enjoy!)
Page section does not update after call of a4j:support in IE 9