session生存時間問題
session.getMaxInactiveInterval();這樣沒下劃線
session.getMaxInactiveInterval(10);這樣getMaxInactiveInterval(10)就會有下劃線錯誤
錯誤顯示如下:
the method getMaxInactiveInterval in the type HttpSession is not applicable for the
arguements(int)錯誤
session.getMaxInactiveInterval();這樣沒下劃線
session.getMaxInactiveInterval(10);這樣getMaxInactiveInterval(10)就會有下劃線錯誤
錯誤顯示如下:
the method getMaxInactiveInterval in the type HttpSession is not applicable for the
arguements(int)錯誤
2016-04-17
舉報
2016-04-17
你如果要設置的話應該是sesstion.setMaxInactiveInterval(10);
2016-04-17
session.getMaxInactiveInterval();是獲取session最大生命周期,值是1800秒。getMaxInactiveInterval()里面沒有參數(shù),當然不能在里面寫個10嘍。setMaxInactiveInterval(10)才對
2016-04-17
這個是設置session時間周期