【问题标题】:i don't understand where i am doing the mistake. i am using eclipse neon IDE for this code我不明白我在哪里做错了。我正在为这段代码使用 eclipse neon IDE
【发布时间】:2017-12-04 09:11:19
【问题描述】:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<c:out value="${'Welcome to SevenMentor'}"/> 

输出:

HTTP Status 500 – Internal Server Error

键入异常报告

Message The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

例外

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
    org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:122)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
    org.apache.jasper.compiler.Parser.parse(Parser.java:145)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:201)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/8.5.14

【问题讨论】:

标签: java jsp jakarta-ee


【解决方案1】:

您的错误基本上是说缺少必要的 jar 文件。

  1. 如果是 maven 项目,请添加依赖项。

  2. 如果是普通项目。请在eclipse中下载并添加jar文件 网络目录。

看到错误,我猜你需要jsp库和jstl库。

【讨论】:

  • 这是一个普通的项目,我已经下载了 jstl-1.2.jar 并包含在我的项目中。但我仍然面临这个问题。你在谈论jsp jar文件吗?还是 JSP 标签 jar 文件?
  • 你能显示你已经包含的jar文件吗?我猜有多个版本的 jstl 或 standard.jar
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-09-01
  • 1970-01-01
  • 2021-06-04
  • 2020-04-19
  • 2014-04-19
  • 1970-01-01
  • 2015-07-13
相关资源
最近更新 更多