I placed the .html file here:-
jakarta-tomcat-4.1.27/webapps/examples/servlets/ajax.html
and When I opened ajax.html page so when I click the submit button to test my AJAX Program... it was not working.. instead it shows an alert box that I have set up in ajax.html page...What I am trying to do.. I am calling servlet getname through the button click event in ajax.html page but when I tried to open the servlet directly...
I got these two error:-
1) exception
javax.servlet.ServletException: Cannot allocate servlet instance for path /examples/servlet/getname
2) root cause
java.lang.UnsupportedClassVersionError: getname (Unsupported major.minor version 49.0)
I have added these two lines in web.xml file
<servlet-mapping>
<servlet-name>getname</servlet-name>
<url-pattern>/getname</url-pattern>
</servlet-mapping>
and
<servlet>
<servlet-name>getname</servlet-name>
<servlet-class>getname</servlet-class>
</servlet>
And also ensure that your ajax request is pointing to resource at Server.
how can I make sure about this thing??