如何取出jsp中el表达式的值

2025-04-16 18:59:05
推荐回答(1个)
回答1:

<%@ 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"对应*/