使用JSP页面执行el表达式的方法
2008-04-29 10:40
405 查看
<%...@page contentType="text/html; charset=GBK" isELIgnored="false"%>
<%...
if (application.getAttribute("count") == null) {
application.setAttribute("count", new Integer(0));
}
Integer count = (Integer) application.getAttribute("count");
application.setAttribute("count", new Integer(count.intValue() + 1));
%>
<html>
<head>
<title>页面被访问数统计</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
</head>
<body bgcolor="#ffffff">
<form action="RequestJsp.jsp">
<p></p>
<p></p>
<h1>
<input type="submit" name="sub" value="点击!"/>
</h1>
<!--输出访问次数 -->
<h1> 此页面已被访问了${applicationScope.count}次
</h1>
</form>
</body>
</html>
相关文章推荐
- 使用IDEA编写jsp时EL表达式不起作用的问题及解决方法
- easyui 执行添加操作,不使用弹窗而使用跳转新页面的方法
- jsp页面中frameset的使用方法
- 关于jsp页面上无法使用EL表达式的问题
- JSP页面禁用EL表达式的原因和实现方法
- 使用Eclipse修改JSP页面需要重启tomcat的解决方法
- JSP页面JSTL提供的函数标签EL表达式操作字符串的方法
- jsp页面中EL表达式被当成字符串处理不显示值问题的解决方法
- JSP页面的静态包含和动态包含使用方法
- 自定义标签:在JSP页面中动态执行Spring Bean的方法
- Spring Boot使用方法小札(1):Web应用返回jsp页面
- IT忍者神龟之 JSP中EL表达式语言不能使用的解决方法
- el表达式在jsp页面不起作用的解决方法
- JSP 页面上使用EL表达式后的问题
- 多种方法实现当jsp页面完全加载完成后执行一个js函数
- JSP页面EL表达式使用的问题
- jsp页面的js 以及 单独的js文件中 使用EL表达式
- ieda使用 在jsp页面中,有时候会出现不能智能显示方法 idea pageContext.setAttribute
- React-Native工程,使用AC-QRCode-RN插件导致其他页面的InteractionManager方法不被执行
- jsp页面使用${}不起作用的解决方法