What does “Context” in “ServletContext” mean?

前端 未结 6 1842
独厮守ぢ
独厮守ぢ 2021-01-31 11:04

Method getServletContextName() returns the name of the \"web application\". That means, \"ServletContext\" is nothing but \"web application\". Ok.

API defin

6条回答
  •  抹茶落季
    2021-01-31 11:37

    ServletContext implies Context or Runtime environment of servlet. Servlets runs in Servlet containers like tomcat. Servlet container creates and provides runtime environment for the servlet to get executed and it manages its lifecycle. It also holds other information, as :-

    • application-wide parameters
    • application event listeners
    • metadata about the application

提交回复
热议问题