📄 setappattr.jsp
字号:
<html>
<head><title>set application attr</title></head>
<body>
<h4>get application information</h4>
ServletInof:<%=application.getServerInfo() %>
<br>application.jsp Real Path:<%=application.getRealPath("/application.jsp") %>
<br>HelloServlet Real Path:<%=application.getRealPath("/servletsample/HelloServlet") %>
<br>Majot Version:<%=application.getMajorVersion() %>
<br>get MIME:<%=application.getMimeType("/servletsample/demo.htm") %>
<br>get Resource:<%=application.getResource("HelloJSP.jsp") %>
<% out.print("<h4>set Attribute value</h4>");
application.setAttribute("myname","zhang hongzhan");
application.setAttribute("counter","1");
out.print("set myname=zhang hongzhan");
out.print("<br>set counter=1");
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -