I am using Tomcat 4.1I have created a folder named test in the ROOT.This test folder contains JSP.I want to be able 2 call servlets from this JSP but cannot figure out where 2 place the servlet class.Any suggessions ? Plz help.
You need to keep your servlet in WEB-INF\classes directory,if you are putting them as classes. If you are collecting all your servlets in a Jar then put them in WEB-INF\lib directory.
Suppose you have a servlet com.amit.HelloWorldServlet then since this servlet is in a package you will need to create directory structure like below.
WEB-INF\classes\com\amit\ and then put the servlet class file over here.
Remember to be able to call the servlet from the JSP or directly from the browser you will also need to register the servlet in Tomcat using web.xml in WEB-INF directory.
Hope this helps