I am having a probably silly issue with starting up my Maven project in Eclipse. I am creating a job application portal and I am using the following uri code
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
This is my index.jsp page for reference:
<%@page import="com.DB.DBConnect" %>
<%@page import="java.sql.Connection" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>AppUp - CUS 1156</title>
<%@include file="all_component/all_css.jsp"%>
<style type="text/css">
.back-img {
background: url("img/header-image.jpg");
width: 100%;
height: 80vh;
background-repeat: no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<%@include file="all_component/navbar.jsp"%>
<% Connection conn = DBConnect.getConn();
out.println(conn);
%>
<div class="container-fluid back-img">
<div class="text-center">
<h1 class="text-white p-4">
<i class="fa fa-book mr-2" aria-hidden="true"></i>AppUp
</h1>
<!-- <p class="text-white p-4">Apply For Entry Level Positions Seamlessly</p> -->
</div>
</div>
<div class="index_info mr-5 ml-5">
<div class="text-center">
<h1 class="text-white p-4">
<h1>Why AppUp?</h1>
<p>Landing your first gig out of college is a daunting task.
Created by two undergraduate students, AppUp is a platform that
highlights the achievements of current college students/new grads,
and breaks the gap that other job platforms have.</p>
<p>Simply create an account with your .edu email, and jazz up
your profile. What are you studying? Any past experiences you want
to share? What about extracurriculars? Personal projects? AppUp is
here to highlight unconventional work you have done, and give you a
platform specifically for new grad positions an internships!</p>
<p>AppUp is unique in a special way. We allow recruiters to
directly post their jobs on our application, allowing for a seamless
process for both recruiters and applicants.</p>
</h1>
</div>
<h1 class="text-white p-4"></h1>
</div>
<%@include file="all_component/footer.jsp" %>
</body>
</html>
When I run the application, I get this error:
Type Exception Report
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.
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
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:54)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:294)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
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:429)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:487)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:106)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:206)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:391)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:367)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:792)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in the server logs.
This is my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>maven Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>maven</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
This is my web.xml:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>
And I have also attached an image of the structure of my code.
As you can see, there is no jstl.jar file within the WEB-INF/lib folder. Is this something I need to download online? I already have tomcat up and running (10.0.27) and I put the jstl dependency in my pom.xml. Sorry if this is a silly question, this is my first time working on a project like this.
Any help is extremely appreciated, thank you so much!