操作方法
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorH
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117) at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311) at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
方法/步骤2
andler.java:56) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
没有jstl架包。下载jstl架包,引入;如果是maven项目引入 <!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl --> <dependency> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>
jsp也买你引入 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
就可以使用jstl标签了。 <c:set var="ctx" value="${pageContext.request.contextPath}" scope = "request"/>