4.11、12servletContext(全局变量)获取项目初始化参数以及在多个servlet之间共享参数

 

 

1:使用servletcontext获取整个web项目初始化参数

 

2:servletContext对象在多个servlet中共享数据

在test2servletContext中设置数据

在test3servletContext中获得数据

猜你喜欢

转载自www.cnblogs.com/jiafeng1996/p/12313567.html