I have been trying to get my '.jsp' file to use a '.css' file that I have created. I had originally stored the '.css' file in my 'WEB-INF' folder but through some searching found that the 'WEB-INF' folder is not public and can therefore not store the file so I moved it outside into the 'webapp' folder but I am still not getting anywhere.
The files 'index.jsp' and 'index.css' files are in the same folder:
'HelloWord/src/main/webapp'
My '/jsp' file links the '.css' as shown
<%@ 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">
<html>
<head>
<link rel="stylesheet" href="${pageContext.request.contextPath}/index.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>MM Vehicle Registration</title>
</head>
I get the following error when I try to run:
Nov 28, 2015 3:42:00 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/HelloWorld/index.css] in DispatcherServlet with name 'dispatcher'
The web page still displays ony without the css decoration. The file is already declared in a '.jsp'
that is being rendered fine so why would I receiving this error?