Hinzufügen externer Ressourcen (CSS / JavaScript / Bilder usw.) in JSP

Ich habe meinem Projekt ein externes CSS-Stylesheet hinzugefügt und in Eclipse im Ordner WEB-CONTENTS meines Projekts abgelegt. Als ich es auf dem Tomcat bereitgestellt habe, wurde das Stylesheet nicht angewendet. Als ich es in Chrome debuggte und öffnete, gab es mir404 file not found Error. Warum ist das so und wie kann man es beheben?

Hier ist der Code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>joined now </title>

<link href="globalCSS.css" rel="stylesheet" type="text/css"/>

</head>
<body>
<div>this is at the top</div>
<c:import url="header.jsp" />
<c:import url="navigationBar.jsp" />  
<c:import url="leftpane.jsp" /> 
<c:import url="mainContent.jsp" /> 
<c:import url="rightpane.jsp" />
<c:import url="footer.jsp" />  
</body>
</html>

Antworten auf die Frage(2)

Ihre Antwort auf die Frage