zoukankan      html  css  js  c++  java
  • jsp不解析el表达式,不识别jstl标签,找不到http://java.sun.com/jsp/jstl/core

    问题描述:

    jsp页面中el表达式,例如:${pageContext.request.contextPath},原样呈现,未被解析。

    解决方案:

    为jsp页添加page指令如下: 

    <%@ page isELIgnored="false" %>

    jsp页面无法识别jstl标签

    jsp页加入taglib指令

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

    但找不到这个标签库

    导入jar包:

    jstl.jar

    standard.jar

    maven pom:

            <dependency>
                <groupId>jstl</groupId>
                <artifactId>jstl</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.2</version>
            </dependency>

    注意其版本,建议1.1.2版

    现最新版为jstl-1.2,用它可以省掉standard.jar包,但不好用,配合tomcat7使用也要做些调整。

    注意:

    1.1版对应的uri="http://java.sun.com/jsp/jstl/core"

    1.0版对应的uri="http://java.sun.com/jstl/core"

    确保WEB-INF/lib文件夹中有这两个jar包,否则你会看到:

     像这样就对了

  • 相关阅读:
    OK335x mksd.sh hacking
    Qt jsoncpp 对象拷贝、删除、函数调用 demo
    OK335xS 256M 512M nand flash make ubifs hacking
    Qt QScrollArea and layout in code
    JsonCpp Documentation
    Qt 4.8.5 jsoncpp lib
    Oracle数据库生成UUID
    freemarker得到数组的长度
    FreeMarker中if标签内的判断条件
    freemarker语法
  • 原文地址:https://www.cnblogs.com/godwithus/p/8771105.html
Copyright © 2011-2022 走看看