Jsp中Java脚本获取EL表达式的值


<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>




Insert title here




本网站总访问人次:${ totalCount }

其中您的访问次数:${ count }


by body
<%=session.getAttribute("count")%>                                /*session.getAttribute('count')与var="count"  scope="session"对应*/
<%=application.getAttribute("totalCount")%>   /*application.getAttribute("totalCount") 与 var="totalCount"  scope="application"对应*/









你可能感兴趣的:(JSP)