Hello All,
1. Within a Spring 4 web application, running on
Tomcat 7, I have a simple welcome
JSP (relevant code below) which fails to find an image! Wondering if someone can point out (silly?) mistake I'm doing..?
-----section of jsp Code----
<html>
<head>
<title> XXX Services Ltd. </title>
</head>
<body>
img src="../img/logo.jpg" alt="logo"
<h3>We are XXX Services Ltd </h3>
</body>
</html>
-----section of JSP Code----
2. Attached is my directory structure. All images are stored under 'img' and all JSPs under 'jsp' , and both of these directories under 'WebContent'
3. As per below web.xml, the 'whoweare.JSP' is correctly loaded, but it can't find logo image.
4. Surely, relative to root, if the jsp has been found correctly....then..relative to jsp, the images have to be found at: '../img/' ?
5. I'm running the applicatoin from Eclipse (as against manually deploying under 'tomcat/webapps') and here is the deployed applicaton directory under 'webapps':
/Dropbox/JavaPrograms/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps$ find MCSL/
MCSL/
MCSL/horiz_menu.js
MCSL/img
MCSL/img/logo.jpg
...
MCSL/jsp
MCSL/jsp/whoweare.jsp
...
MCSL/META-INF
MCSL/META-INF/MANIFEST.MF
MCSL/META-INF/maven
MCSL/META-INF/maven/MCSL
MCSL/META-INF/maven/MCSL/MCSL
MCSL/META-INF/maven/MCSL/MCSL/pom.properties
MCSL/META-INF/maven/MCSL/MCSL/pom.xml
MCSL/WEB-INF
MCSL/WEB-INF/classes
MCSL/WEB-INF/classes/....
MCSL/WEB-INF/lib
MCSL/WEB-INF/lib/aopalliance-1.0.jar
MCSL/WEB-INF/lib/commons-logging-1.1.3.jar
MCSL/WEB-INF/lib/spring-core-4.0.5.RELEASE.jar
MCSL/WEB-INF/lib/spring-web-4.0.5.RELEASE.jar
MCSL/WEB-INF/lib/spring-webmvc-4.0.5.RELEASE.jar
...
MCSL/WEB-INF/spring-dispatcher-servlet.xml
MCSL/WEB-INF/web.xml
Many Thanks.