can I extend from a baseclass servlet?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Erik_Runia
Posted On:   Thursday, April 11, 2002 10:32 AM

Hello all, I have written a baseclass which extends httpservlet. In this class I handle doget, dopost and so on. I have a few custom methods in this class which are basically stubs, empty methods meant to be overridden from another class. My question is, can I make a servlet, which extends from this baseclass and have it work as a servlet? I tried to do so but I'm getting an error that says the class "myBaseClass" cannot be found in type declaration or import. But it is clearly available in the same package and all looks well with the code, but this error points to the public class myServlet extends myBaseClass line. Any help?    More>>

Hello all,


I have written a baseclass which extends httpservlet. In this class I handle doget, dopost and so on. I have a few custom methods in this class which are basically stubs, empty methods meant to be overridden from another class.


My question is, can I make a servlet, which extends from this baseclass and have it work as a servlet?


I tried to do so but I'm getting an error that says the class "myBaseClass" cannot be found in type declaration or import. But it is clearly available in the same package and all looks well with the code, but this error points to the public class myServlet extends myBaseClass line.


Any help?

   <<Less

Re: can I extend from a baseclass servlet?

Posted By:   Laurent_Mihalkovic  
Posted On:   Thursday, April 11, 2002 11:25 AM

nothing impossible there... stupid question: are you sure you have the spelling of your class right ("myBaseClass")???
About | Sitemap | Contact