JSP表达式语言错误


问题内容

我创建了一个动态Web模块项目usig STS和Spring MVC。问题是我已经在模型中添加了一个字符串,但是无法使用EL在JSP页面上显示它。

我可以知道这有什么问题吗?

下面是详细信息:JSP页面

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Spring MVC</title>
</head>
<body>
    Home 
    <br />

    <c:out value="${message}" />

</body>
</html>

Web.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

MVC控制器:

@Controller
public class HomeController {

    public HomeController() {
        super();
    }

    @RequestMapping(value="/home", method=RequestMethod.GET)
    public ModelAndView showHomePage() {

        // View Name - Model Name - Model Data
        return new ModelAndView("home", "message", "Hello Spring MVC");
    }
}

Dispatcher-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <!-- http://www.jpalace.org/docs/tutorials/spring/mvc_10.html -->

    <!-- Context Scan -->
    <context:component-scan base-package="com.peter.controller"/>

    <!-- Handler Mapping -->
    <bean id="handlerMapping" class="org.springframework.web.portlet.mvc.annotation.DefaultAnnotationHandlerMapping">
    </bean>

    <!-- Handler Adapter - AnnotationMethodHandlerAdapter --> 
    <!-- Invoke Handler Method -->
    <bean id="handlerAdapter" class="org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter">
    </bean>

    <!-- Pre/Post Handler Interceptor -->
    <!-- 
    Implement HandlerInterceptor 
    Declare HandlerInterceptor inside DefaultAnnotationHandlerMapping property or 
    globally inside <mvc:interceptors>
    Need configure Filter object inside web.xml

    <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
        <property name="interceptors">
            <list>
                <bean class="pckg.MyInterceptor1"/>
                <bean class="pckg.MyInterceptor2"/>
            </list>
        </property>
    </bean>

    <mvc:interceptors>
        <bean class="pckg.MyInterceptor1"/>
        <bean class="pckg.MyInterceptor2"/>
    </mvc:interceptors>

    -->

    <!-- View Resolver -->
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
        <property name="prefix" value="/WEB-INF"></property>
        <property name="suffix" value=".jsp"></property>
    </bean>

    <!-- Exception Resolver -->

    <!-- Register Interceptor, Message Resource, Bean validation support, Message conversion and field formatting -->
    <mvc:annotation-driven />

</beans>

我的构建路径中有JSTL.jar。在Java构建路径上找不到有关“
c:out”的标记处理程序类(org.apache.taglibs.standard.tag.rt.core.OutTag)的警告消息

请帮忙。

谢谢。


问题答案: