hello there, I am using tomcat to run servlets , to invoke servlets in tomcat , in browser we type "http://server:80/servlet/ServletName" , but how can we invoke servlets like "http://server:80/servlet/directoryname/ServletName" , where dirctoryname is the name of directory in which ServletName.class resides. I know by setting classpath we can put servlets class in other direcotories then web-inf , but how to invoke servlet by putting servlet class in a certain directory and then invoking that servlet using that directory name in url. e.g. "http://server:80/servlet/directoryname/ServletName"
[This message has been edited by ray bond (edited January 04, 2001).]
Ray, We need to define 2 params in Web.xml file Define 1. <servlet> Name </servlet> 2. Use 'Name' in <servlet-mapping> </servlet-mapping>. I just cut and paste an example came with Tomcat 3.1 [This message has been edited by maha anna (edited January 04, 2001).]
Joined: Oct 11, 2000
hello there , thank you very much maha for your reply , it is working perfactly fine.