web开发错误处理:HTTP Status 500 – Internal Server Error(3)

在MacOS上使用eclipse和maven开发时遇到HTTP Status 500错误,问题源于缺少jstl的实现。解决方案包括手动添加jar文件、调整maven依赖配置,以及解决NoClassDefFoundError问题。参考了StackOverflow上的相关讨论。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

操作系统:MacOS 10.15
开发环境:eclipse 2019-06 (4.12.0)+maven3.5.4+tomcat7.0.90

问题描述

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



Exception: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

出错原因

在引用C标签<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>时无法解析http://java.sun.com/jsp/jstl/core,原因是没有导入jstl的实现

解决办法

1.简单粗暴添加taglibs-standard-impl.jar/taglibs-standard-impl.jar+taglibs-standard-spec
2.使用maven的话,添加(需要版本对应)——我自己的办法

<dependency>
			<groupId>org.apache.taglibs</groupId>
			<artifactId>taglibs-standard-impl</artifactId>
			<version>1.2.5</version>
</dependency>
<!-- 我没有加也可以运行了-->
<dependency>
	<groupId>org.apache.taglibs</groupId>
	<artifactId
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值