不挂科搜题免费

问题:

欲从HTTP请求中获得用户的请求参数值,应该调用下面的哪个方法?

选项

  • 调用HttpServletRequest对象的getAttribute()方法

  • 调用ServletContext对象的getAttribute()方法

  • 调用HttpServletRequest对象的getParameter()方法

  • 答案:

    A.调用HttpServletRequest对象的getAttribute()方法