• Post Reply Bookmark Topic Watch Topic
  • New Topic

From wher log methods come in GenericServlet  RSS feed

 
raj malhotra
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have read this line from sun documentation about GenericServlet

GenericServlet also implements the log method, declared in the ServletContext interface.


but in the documentation i have not seen GenericServlet implements ServletContext so how GenericServlet has implemented log method from ServletContext interface.

Thanks in advance
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see GenericServlet.getServletContext()
 
raj malhotra
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see GenericServlet.getServletContext()

Hi David
I saw that method in GenericServlet it returns ServletContext instance.
But my question was GenericServlet is a class which implements log method from ServletContext interface. But if we implement a method from an interface we should define class definition as 'GenericServlet implements ServletContext' but its not there. thats the reason of confusion.
Hope i am able to say my doubt correctly.
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It just calls the log method on servletContext.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!