JSP中EL隐含对象

EL隐含对象有以下11种:

1.pageContext:取得用户请求或页面信息;
2.pageScope:相当于page.getAttribute(name);
3.requestScope:相当于request.getAttribute(name);
4.sessionScope:相当于session.getAttribute(name);
5.applicationScope:相当于application.getAttribute(name);
6.param:相当于request.getParameter(name);
7.paramValues:相当于request.getParameterValues(name);
8.header:相当于request.getHeader(name);
9.headerValues:相当于request.getHeaders(name);
10.cookie:相当于request.getCookies();
11.initParam:相当于config.getInitParameter(name);

例如:userName:<input type="text" name="userName"/>

  ///获取文本框的值

   userName:${param.userName}

你可能感兴趣的:(jsp)