标签:
在web.xml的<servlet>标签中增添
<init-param>
<param-name>XXX</param-name>
<param-value>XXX</param-value>
</init-param>
public void init() throws ServletException {
// Put your code here
this.setUsername(this.getInitParameter("username"));
this.setPassword(this.getInitParameter("password"));
}
标签:
原文地址:http://www.cnblogs.com/jasonlixuetao/p/5811677.html