What is the difference between context and init parameters in servlet configuration?

  • Context parameters are set at the application level, while init parameters are at the servlet level.
  • Context parameters are used for initialization, and init parameters are used for configuration.
  • Init parameters are set at the application level, while context parameters are at the servlet level.
  • Init parameters are used for initialization, and context parameters are used for configuration.
Context parameters are set at the application level and are shared among all servlets, while init parameters are specific to each servlet. Init parameters are configured in the servlet's declaration in the web.xml file.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *