Hi,
I have a question about using package for servlets. Suppose I have the following package structure:
Inside the application directory my-app/, I want to put a java class myServlet.class which belongs to the package my-pack/, so I create the following structure:
my-app/my.jsp
my-app/WEB-INF/classes/my-pack/myServlet.class
my-app/WEB-INF/web.xml
What this is doing is to go from "my.jsp" and then click a SUBMIT button to go to "myServlet" page. But, the interesting thing I noticed is -- If I do NOT define "myServlet" in the <servlet> part of web.xml, it works fine. However, if I defined it, it failed. I tried the follwoing two ways to define the <servlet-calss> for "myServlet"
a) <servlet-class> myServlet </servlet-class>
b) <servlet-class> my-pack.myServlet </servlet-class>
but none of them works. So, question is -- if we have packaged servlet, do we need to define them in the web.xml and how to reflect their package structure in the <servlet-class> part ?
Thank,
Ian