如何使用spring标签库是否需要任何jar

时间:2012-09-26 13:32:11

标签: spring-mvc

当我在JSP中添加标记库时,我得到了这个异常。我正在使用具有弹簧安全性的spring mvc。

我的JSP:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     <%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>

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

    <c:set var="menuSel" value="MenuName" />
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <style type="text/css">
    @import url('resources/css/iCRL/iCRL.css');
    @import url('resources/css/iConfigure/iConfigure.css');
    @import url('resources/css/iConfigure/improvedDropdown.css');
    </style>
    <title>iCMT| iConfigure</title>
    <script>
    var context = "<c:url value=""/>";



    var include="<c:out value="getText('message.include')"/>;
    var exclude="<c:out value="getText('message.exclude')"/>;
    var itemToMove="<c:out value="getText('message.itemToMove')"/>";
    var confirmMsg="<c:out value="getText('message.confirmMsg')"/>";
    var fileReqrd="<c:out value="getText('message.fileRequired')"/>";   
    var textFile="<c:out value="getText('message.textFile')"/>";
    var compareDates="<c:out value="getText('message.compareDates')"/>";
    var validStartDate="<c:out value="getText('message.validStartDate')"/>";
    var validEndDate="<c:out value="getText('message.validEndDate')"/>";
    var selectFilter="<c:out value="getText('message.selectFilter')"/>";
    var FilterText="<c:out value="getText('message.FilterText')"/>";
    var differentCodeType="<c:out value="getText('message.differentCodeType')"/>";
    var validateAssoc="<c:out value="getText('message.validateAssoc')"/>";
    var NotToSearch="<c:out value="getText('message.NotToSearch')"/>";
    var NotToModify="<c:out value="getText('message.NotToModify')"/>";




     </script>
    </head>
    <body>
        <jsp:include page="../admin/pgHeader.jsp" flush="true">
            <jsp:param name="menuSelected" value="iCRL" />
        </jsp:include>
        <script type="text/javascript" src="resources/js/iConfigure/improvedDropDown.js"></script>
        <script type="text/javascript" src="resources/lib/jquery.Multiselect/js/jquery.multiselect.filter.js"></script>
        <div class="main_content_centered">
            <div class="main_content_outer_wrapper">
                <div class="s-content">
                    <div class="clean"></div>

                    <form action="iconfigure" method="post" name="configureForm"
                           value="iconfigure" id="configureForm" target="_self" enctype="multipart/form-data">
                        <div class="section_w1000">
                            <div class="module-info-container">
                                <div class="module-info">
                                    <div class="module-info-icon icfg-upload_icon"></div>
                                    <div class="module-info-content">
                                        <div class="module-info-title"><c:out value="Create Category"/></div>

添加%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>后出现此错误

  

输入异常报告
  消息说明服务器遇到内部错误(),导致其无法完成此请求   例外

     

org.apache.jasper.JasperException:/jsp/iConfigure/pgiConfigure.jsp(90,26)根据TLD或标记文件,标记输出必须使用属性值

     

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)         org.apache.jasper.compiler.Validator $ ValidateVisitor.visit(Validator.java:842)         org.apache.jasper.compiler.Node $ CustomTag.accept(Node.java:1530)         org.apache.jasper.compiler.Node $ Nodes.visit(Node.java:2377)         org.apache.jasper.compiler.Node $ Visitor.visitBody(Node.java:2427)         org.apache.jasper.compiler.Node $ Visitor.visit(Node.java:2433)         org.apache.jasper.compiler.Node $ Root.accept(Node.java:495)         org.apache.jasper.compiler.Node $ Nodes.visit(Node.java:2377)         org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1776)         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)         org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)         org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)         org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)         javax.servlet.http.HttpServlet.service(HttpServlet.java:847)         org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)         org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)         org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)         org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)         org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)         org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)         org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)         javax.servlet.http.HttpServlet.service(HttpServlet.java:734)         javax.servlet.http.HttpServlet.service(HttpServlet.java:847)         org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)         org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)         org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:368)         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)         org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)         org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:380)         org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)         org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)         org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

1 个答案:

答案 0 :(得分:1)

这与Spring MVC无关。错误消息明确指出c:out标记在第90行缺少值属性。我无法向您显示准确的代码,因为您只发布了JSP的前60行左右。