I am trying to call a Servlet called AddClass.java using the following line in a jsp
<form method="post" name="addClass" action="AddClass.do">
The class is in package web and the filename is AddClass.java
A similar servlet named SeedSearch is called (and everything works fine) from this piece of code in another jsp.
<form method="post" name="seedSearch" action="SeedSearch">
My web.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>sempedia</display-name>
<servlet>
<servlet-name>SeedSearch</servlet-name>
<servlet-class>web.SeedSearch</servlet-class>
</servlet>
<servlet>
<servlet-name>AddClass</servlet-name>
<servlet-class>web.AddClass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SeedSearch</servlet-name>
<url-pattern>/SeedSearch</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AddClass</servlet-name>
<url-pattern>/AddClass.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Please help.