JSP application. Getattribute () method: get attribute value
•
Java
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
二维码
