I am new to servlets .I am using eclipse juno for this.I am having a trouble in running my program..My code is
package sTraining;
import java.io.*;
import javax.servlet.*;
public class Servlet1 implements Servlet{
ServletConfig config=null;
public void init(ServletConfig config){
this.config=config;
System.out.println("servlet is initialized");
}
public void service(ServletRequest req,ServletResponse res)
throws IOException,ServletException{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.print("<html><body>");
out.print("<b>hello simple servlet</b>");
out.print("</body></html>");
}
public void destroy(){System.out.println("servlet is destroyed");}
public ServletConfig getServletConfig(){return config;}
public String getServletInfo(){return "copyright 2007-1010";}
}
I am getting this error[http://localhost:8080/Test/WEB-INF/classes/sTraining/Servlet1.java][1] although i have this thing in my web .xml file
<servlet>
<description></description>
<display-name>Servlet1</display-name>
<servlet-name>Servlet1</servlet-name>
<servlet-class>servlet.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
why this is not running? My code is fine. First time when I run this page it run, but running this program after my second program it did not run and that second program also not run.