• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query on GenericServlet

 
Rahul Jadaun
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the following question from jDiscuss -

Consider the following code:
public class WWServlet extends GenericServlet
{
....
}
What methods do you need to implement so that it compiles without any errors?


Any answers..?
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm...

if you extend it then you must implement the

service(ServletRequest,ServletResponse) method so that your class compilse without errors ! this is because

the class GenericSerlvet is abstrat as it implements all the methds of the intrface 'Servlet' nemely -

ini( )
destory( )
getServletConfig( )
getServletInfo( )

except service(ServletRequest,ServletResponse)

correct me if i am wrong !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic