• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getServletContext() - bad OO desing???

 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I wonder why the getServletContext() method is not in Servlet interface.
Additionally, when I looked at the api I realized it is in GenericServlet class and it's actually just a wrapper to the ServletConfig.getServletContext() method.
Shouldn't the getServletContext() method be in Servlet interface???
Just trying to understand the design...

p.s.: I understand that ServletContext() is actually a "ApplicationContext", but anyway, maybe the Servlet interface could have had this method.
[ May 24, 2005: Message edited by: Leandro Melo ]
 
Nobuhiro Watsuki
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed. I wonder why all GenericServlet methods are not in the Servlet interface.
[ May 24, 2005: Message edited by: Nobuhiro Watsuki ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic