• java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config


    今天写SpringMvc时,遇到这样一个问题:

    java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
    at org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:101)
    at org.springframework.web.servlet.view.JstlView.exposeHelpers(JstlView.java:135)
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)

    于是思考了半天,终于找出来了,原来少导了jstl.jar.和standard.jar这两个jar包

     jstl.jar.

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


    standard.jar
    <dependency>
    <groupId>taglibs</groupId>
    <artifactId>standard</artifactId>
    <version>1.1.2</version>
    </dependency>

    这两个jar包又有什么作用呢?

    standard.jar的作用
    JSP 标准标签库,和jstl.jar 一起使用,在1.0的版本中,但在jstl-1.2.jar 就不在需要了。
    如果你想在项目中使用JSTL和EL表达式,那么你必须要引入这个standard.jar文件。即使你没有引入,那MyEclipse工具自带的类库也会帮你倒入。

  • 相关阅读:
    文本设置超过几行显示...
    CSS内置的几个标准的伪类和伪对象
    正则替换URL地址为链接地址
    移动端某些机型touchend事件触发鸡肋
    zepto 扩展prevAll(),nextAll()方法
    火狐下window.event获取undefined问题
    哪些情况下margin-left和padding-left无效?
    兵部-2048
    HTML5 将成为 HTML、XHTML 以及 HTML DOM 的新标准。HTML 的上一个版本诞生于 1999 年。自从那以后,Web 世界已经经历了巨变。HTML5 仍处于完善之中。然而,大部分现代浏览器已经具备了某些 HTML5 支持。
    二分查找
  • 原文地址:https://www.cnblogs.com/buglove/p/5159093.html
Copyright © 2020-2023  润新知