ServletContext功能 域对象2

ServletContext功能:

  获取MIME类型:在互联网通信过程中定义的一种文件数据类型

  格式 大类型/小类型 text/html image/jpeg

  获取:String getMimeType

 

 域对象:共享数据

  1.setAttribute(String name,Object value)

  2.getAttribute(String name)

  3.removeAttribute(Sting name)

ServletContext对象范围:所有用户所有请求的数据

 

posted @ 2023-02-01 15:31  帕拉利斯  阅读(16)  评论(0)    收藏  举报