i have just started learning servlet and following book name budi kurniawan so me beggnier. i am using jdk1.5.0 and tomcat4.1 both of whiich instal in C:\ ,now under tomcat4.1i did this C:\Tomcat 4.1\webapps\akash\WEB-INF\classes and put my 1st servlet prog(as given below) import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class TestingServlet extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { PrintWriter out = response.getWriter(); out.println("<HTML>"); out.println("<HEAD>"); out.println("<TITLE>Servelet Testing</TITLE>"); out.println("</HEAD>"); out.println(" out.println("welcome to akash home"); out.println(" out.println("</HTML>"); } } as well as the compiled file that is .class file in it.after that i created web.xml file (as given below) <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name> Testing </servlet-name> <servlet-class> TestingServlet </servlet-class> </servlet> </web-app> and put it under C:\Tomcat 4.1\webapps\akash\WEB-INF directory but after starting tomcat whenever i am trying to run the servlet(using this) http://localhost:8080/akash/servlet/Testing i am getting this(given below) HTTP Status 404 - akash/servlet/Testing
hi, thanx for ur reply i tried ur suggestion but it didn,t working just say what to write at the plase of URL under <url-pattern>/url to access</servlet-pattern> i also want to say u some thing when i am placing my compiled .class file under examples folder it working fine any way help me thanx again for ur reply akash