ServletConfig对象

ServletConfig对象

http://hain.iteye.com/blog/70731

GenericServlet ( httpServlet 父类) 存在

private transient(不会被序列化到硬盘) ServletConfig config;

String value = getServletConfig().getInitParameter("name") ;

可以通过上述方法得到servlet中所配置的参数的值。

一般会配置编码格式 jdbc的链接静态参数

总结:

  

原文地址:https://www.cnblogs.com/Knuth/p/2473779.html