ServletContext
2022-03-03 16:45:28 0 举报
test
作者其他创作
大纲/内容
在其他Servlet中初始化ServeltContext,调用getAttribute方法去获取值(这注意转换对象为String或其他数据格式,)
ServletURL:/s1
ServletContext con = this.getServletContext();//取ServletContext的对象,this代表是当前类下的
ServletURL:/s3
ServletContext(可以保存一些东西)
ServletURL:/s2
con.setAttribute(\"name\
收藏
0 条评论
下一页