Talk:Web Science/Part1: Foundations of the web/Dynamic Web Content/Ajax and the XMLHttpRequest class

ClassNotFoundException in the "Ajax and the XMLHttpRequest Class" example
Hello,

The "Ajax and the XMLHttpRequest Class" example is excellent (just what I was looking for), but I cannot get it to run. When I execute it in Eclipse (on a Tomcat 6 server), it displays the registration form OK. When I enter any name in the "enter user" field and click on the next field, I get the following exception:

jul 09, 2014 9:34:21 AM org.apache.catalina.core.ApplicationContext log Información: Marcando el servlet Register como no disponible jul 09, 2014 9:34:21 AM org.apache.catalina.core.StandardWrapperValve invoke Grave: Excepción de reserva de espacio para servlet Register java.lang.ClassNotFoundException: org.eclipse.jetty.server.Handler at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1149) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source)

I'm a newbie in Eclipse/Servlet development, but it seems like the Register servlet is not found, right? Could it be a problem with the Web.xml file?

THANKS A LOT!!!,

Alex Olazabal Madrid, Spain aolazaba@tragsa.es
 * it seems like you are missing servelet.jar in your classpath but I am not sure. You could also try using EclispseEE which ships with serverside and tomcat support and I think also with servelet.jar. Did you try to pack a war file and deploy it via tomcat manager? Using maven you could deploy the project as a war file. The reason why we use jetty here is to exactly omit all the problems that arise with tomcat toolchain.--Renepick (discuss • contribs) 13:55, 10 July 2014 (UTC)