getappattr.jsp
来自「java的一系列产品中包括jsme,jmse,j2ee,本文件提供j2ee实现的」· JSP 代码 · 共 13 行
JSP
13 行
<html>
<head><title>get application attr</title></head>
<body>
<br>get Attribute:<%=application.getAttribute("myname") %>
<br>Counter:
<% int mycounter=Integer.valueOf(application.getAttribute("counter").toString()).intValue();
out.print(mycounter);
application.setAttribute("counter",Integer.toString(mycounter+1));
%>
<br>MyName:<%=application.getAttribute("MyName")%>
<br>YourName:<%=application.getAttribute("YourName")%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?