Difference between ServletContext and ServletConfig | Eklavya Online

Difference between ServletContext and ServletConfig

ServletConfig: 

  • One ServletConfig Object is created per servlet
  • It can be used to access ServletContext
  • Parameters are configured in DD(deployment description)

ServletContext

  • One ServletContext will be created per web application.
  • Can be used to access web app parameter.
  • Can be used to get server Info.