在div中写了el表达式会错误解决办法

来源:互联网 发布:一个人开两家淘宝店 编辑:程序博客网 时间:2024/06/06 23:54

若有maven的项目
- 在pox.xml中配置:

<dependency><groupId>javax.servlet</groupId><artifactId>jstl</altifactId><version>1.2</version></dependency><dependency><groupId>javax.servlet.jsp</groupId><artifactId>jsp-api</altifactId><version>2.2.1-b03</version><scope>provided</scope></dependency>

页面中引入:

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

则div中的可以这样写

url:'<c:out value="${pageContext.request.contextPath}"/>/userAction!reg.action
原创粉丝点击