JSP application. Getattribute () method: get attribute value

getAttribute(String name)

Example

<%
  application.getAttribute("user");
%>

Typical application

<body>
  <%
     application.setAttribute("userName","大熊猫");//在application对象中保存属性
     out.println("保存在application里的属性值为:"+application.getAttribute("userName"));//在页面中输出属性信息
   %>
</body>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>