我试过尝试stackoverflow上的所有答案,但失败了

时间:2015-12-07 14:30:59

标签: java spring maven jsp servlets

绝对uri:http //:java.sun.com/jsp/jstl/core无法在web.xml或使用此应用程序部署的jar文件中解析 当我使用Tomcat7.0运行SpringMVC Web应用程序时,浏览器会给我这个错误, 请给我一些解决这个问题的建议,我很感激你能告诉我如何处理它。

这是我的POM.xml:

<dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-mongodb</artifactId>
            <version>1.8.1.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-api</artifactId>
           <version>1.5.6</version>
           <type>jar</type>
        </dependency>

        <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-simple</artifactId>
           <version>1.5.6</version>
        </dependency>

        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
        <version>2.1</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging-api</artifactId>
            <version>1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency> 
  </dependencies>

这是JSP代码

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

    <html>
    <head><title>Spring3.0xLogin</title></head>
    <body>
        <c:if test="${!empty error}">
            <font color="red"><c:out value="${error}"/></font>
        </c:if>
        <form action="<c:url value="/loginCheck.html"/>" method="post">
            User:<input type="text" name="userName"><br>
            PassWord:<input type="passWord"><br>
            <input type="submit" value="Login"/>
        </form>
    </body>
    </html>

1 个答案:

答案 0 :(得分:2)

http://java.sun.com/jsp/jstl/core

你把斜线放在斜线上。写这个