ALL classes used in servlets should be in a package and stored according to the package under classes.
The reason is that without a package ("default package") the JVM looks in the "current" directory. With servlets you have no control over the current directory, the container cant find the class so you get that error message.
This is one of the most common problems for people new to servlets.
yes i did change web.xml file but Still its not working.
One problem I have is thats whenever I try 2 run even a simple Html file say Helloworld.html from
D:\Apache Software Foundation\Tomcat 5.5\webapps\ch1 using the link as http://localhost:8080/ch1/helloworld.html it gives errror as The request resource is not available.
but when i run the same file from D:\Apache Software Foundation\Tomcat 5.5\webapps\root with link as http://localhost:8080/helloworld.html it displays the page properly.
really cant figure out wat is the problem
The reason is probably that Tomcat is not recognizing ch1 as a valid web application. Usually this is the result of a faulty directory structure or a faulty web.xml deployment descriptor. Error messages should be showing up in the log files.
You are stopping and restarting Tomcat after every change, right?
1. web.xml not valid xml format, gets rejected during startup.
2. directory structure under classes does not follow package structure, class not found, servlet not created
3. URL being used does not map to servlet according to web.xml rules. Remember, case is important.