Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

intersting discovery and a problem for images not showing up in JSPs

 
Rex Norm
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently upgraded mightily from an old struts 1.2.x running on Resin to Struts 1.3.10 (woohoo) running on Tomcat 6, only to discover that my images would not show up on any of my pages. However, the servlets and jsps executed fine. Only the images didn't show, the css is also affected, as is the javascript.

my director structure is as follows (still not completely cleaned up from the port):



There was a prior set of (very helpful) posts from c. 2003 or 2004 that gave the solution: the jsp's I ported all use "/" at the beginning of their image references(i.e. abosolute references)... that is


If I remvoe the "/", I get the images (i.e. relative references). So clearly this is a reference problem.

The problem is I have a ton of jsp's and I'd rather not change every <img /> tag.

My Question:
The site uses Tiles, so I thought that using a <base> tag in the header of the common tile page would help with images, but this does not seem to work or I've got the syntax wrong. Is there another way to change to relative references? would this method affect other references and what could I do about those?

Any help would be appreciated-- maybe even suggestions about the base tag syntax?



 
Rex Norm
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing...

If I look for the image as follows: http://localhost:8080/mySite/images/close.gif, I can see the image. So I know the images are present and can be accessed.

could this be a struts or tomcat issue where I can set relative references as opposed to absolute ones (as it seems to be doing)?


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!