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 a servlet that gets an HTML file that has some GIFs in it. The problem I am encountering is the page is retrieved, but the GIFs are not displaying. The html page is in jakarta-tomcat-4.0.4/webapps/ROOT The GIFs are currently in jakarta-tomcat-4.0.4/webapps/ROOT The html references the GIFs similiar to <img src="myLogo.gif"> On my desktop the images show, however when deployed on the server the images do not show. How can this be corrected? Randall
Since you are specifying a relative reference to the images, the browser is trying to find them in the same folder as the page. However, since your page is emitted by a servlet, there really is no "page". What the broser is doing is to use the URL of the servlet (probably a servlet mapping, no?) as the base for your relative references. You will need to either use server-relative href's for your images, or use the <base> tag to provide a relative base for the images. bear