方法getServletContextName()
返回"Web应用程序"的名称.这意味着,"ServletContext"只不过是"Web应用程序".好.
API定义:
ServletContextListener接收有关它们所属的Web应用程序的servlet上下文更改的通知.
"Web应用程序"的"servlet上下文"是什么意思?实际上"ServletContext"中的"Context"是什么?
JB *_*zet 21
这个名字确实是IMO,非常糟糕.
我们必须将ServletContext读作"基于servlet API的Web应用程序的一般上下文".而我们必须将ServletConfig(另一个标准类)读作"servlet的配置".
他们应该IMO将ServletContext命名为"WebAppContext"或"ApplicationContext",将ServletConfig命名为"ServletContext".
顺便说一句,在JSP中,链接到JspPage的范围被命名为"page"; 链接到HttpServletRequest的范围被命名为"request"; 命名为HttpSession的范围命名为"session",链接到ServletContext的范围命名为""application".
Boz*_*zho 10
"上下文"表示..上下文 - 它具有特定Web应用程序的上下文信息和功能:
ServletContext
是Java Web应用程序的上下文(因为它使用servlet)
归档时间: |
|
查看次数: |
7918 次 |
最近记录: |