I am new to Servlet Programming. I have prepared a directory under tomcat/webapps/ch1/WEB-INF/classes. Where I put the classfile in classes and web.xml file in WEB-INF. I run it by typing http://localhost:8080/ch1/Serv1. It is showing the desired result. But If I make the directory structure as tomcat/webapps/HeadFirst/ch1/WEB-INF/classes and run by typing http://localhost:8080/HeadFirst/ch1/Serv1, it is giving error. Why? Can't I put ch1 folder inside any other folder like HeadFirst. I don't want to keep it directly under webapps.
Thanks in advance.
N.B. /Serv1 is the url-pattern for Servlet-mapping in xml file.
Now my directory structure is tomcat/webapps/HeadFirst/ch1/WEB-INF/classes And I run it by typing http://localhost:8080/ch1/Serv1. It is showing the desired result. But other application which is directly under webapps didn�t working.
So if you please explain with an example. Thanks in advance.