多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

A web application uses the HttpSession mechanism to determine if a user is "logged in." When a usersupplies a valid user name and password, an HttpSession is created for that user. The user has access tothe application for only 15 minutes after logging in. The code must determine how long the user has beenlogged in, and if this time is greater than 15 minutes, must destroy the HttpSession. Which method in HttpSession is used to accomplish this?()

  • A、Getcreationtime
  • B、Invalidateafter
  • C、Getlastaccessedtime
  • D、Getmaxinactiveinterval
正确答案:A
答案解析:
进入题库查看解析

微信扫一扫手机做题