This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have an ad banner (just an IMG tag for now) that displays when the user first goes to the main JSP page in my application. However when he gets re-directed to a page in the WEB-INF directories after leaving the first JSP page (where the img does display), the IMG file no longer displays on the next JSP page. >> I'm using Tomcat << I've tried putting the image in various directories (like 'lib'), including the classes folder, but Tomcat doesn't seem to be able to find it. (Though Tomcat does find it in the folder where the first JSP page is.)
Can anybody tell me where to put the IMG so it can be found when the servlet re-directs the first JSP page (Login) to another page? Thanks much! -- Mike
A web server can't directly serve any file from WEB-INF - you have to put the image file in with normal application html or jsp files. The problem is that without an absolute URL, the browser is looking for the file relative to where the page is coming from. I like to use a BASE tag in the HEAD area of the generated HTML page to tell the browser where to look for resources like CSS files, images, etc. Bill