The directory structure appears as follows -
projectroot -- src --> main-->java-->com-->controllers etc
-- src --> resources--> myresources --> css-->.css
-- src --> resources--> myresources --> images-->.jpg etc
-- src --> webapp --> mvc-dispatcher-servlet.xml
-- src --> webapp --> pages --> .jsp pages
The top of the page includes -
<%@ 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>
<html>
<head>
In the head
section of the page, I am using the following -
<link
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"
rel="stylesheet">
<link
href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"
rel="stylesheet">
<link href="<c:url value="/resources/css/style.css" />" rel="stylesheet">
Images are referenced like this -
<img src="/resources/images/logo2.png" height=20;></a>
The mvc-dispatcher-servlet contains -
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<mvc:resources mapping="/resources/**" location="/resources/myresources/" />
<mvc:annotation-driven />
Although there are no console errors, the page does not display correctly. Can anyone provide suggestions on why the images and CSS files are not loading properly? Could it be an issue with the resource mapping in mvc-dispatcher or perhaps a problem with the project directory structure? Thank you for any assistance with this matter.