I am writing a domain registration application.Typically, servlets
extend the HttpServlet class and import java.io.*, javax.servlet.*,
and javax.servlet.http.*.  There are some methods and variables that I
want to make available to all of my servlets in this application.  So,
I decided to create a DomainRegBase class which extends HttpServlet
and imports java.io.*, javax.servlet.*, and javax.servlet.http.* just
like a servlet would.  I then add my methods and variables to the
DomainRegBase class and have all of my servlets extend from the
DomainRegBase class rather than from the HttpServlet class.All seems
to be working well.  However, I was a bit surprised to observe that in
order to get my individual servlets to compile I need to import
java.io.*, javax.servlet.*, and javax.servlet.http.* into each of my
individual servlets.  I was sort of thinking that if I imported those
classes into a parent class that would be sufficient for all the
children.  Apparently it isn't.  Am I missing something?  Thanks.
      ... doug

Reply via email to