• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getServletContext() - bad OO desing???

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic