为了账号安全,请及时绑定邮箱和手机立即绑定

为什么我获得是空值,求解

http://img1.sycdn.imooc.com//58303a210001779108390315.jpg为什么我获得是空值,求解

正在回答

5 回答

确实需要注意加上引号,谢谢各位提醒:

this.setUsername(this.getInitParameter("username"));

this.setPassword(this.getInitParameter("password"));


0 回复 有任何疑惑可以回复我~

public void init() throws ServletException {

super.init();//需要加上这条语句就好啦

this.setUsername(this.getInitParameter("username"));

this.setPassword(this.getInitParameter("password"));

}


0 回复 有任何疑惑可以回复我~

加了啊

0 回复 有任何疑惑可以回复我~

public void init() throws ServletException {

this.setUsername(this.getInitParameter("username"));

this.setPassword(this.getInitParameter("password"));

是不是username和password没有加双引号啊

3 回复 有任何疑惑可以回复我~

你是不是同时用了config的初始化?

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么我获得是空值,求解

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号