Hello,
 
I ran into an issue that I am having trouble getting my hands around.
 
I am building a Struts Framework app on Tomcat. I have set my welcome-file-list 
to
 <welcome-file-list>
    <welcome-file>welcome.jsp</welcome-file>
  </welcome-file-list>
 
then I have a welcome.jsp file that does a global forward like so "  
<logic:forward name="welcome"/> "
and all is good, and eventually the action forwards it to a page called 
"main.jsp" which lives at the root of the webapp.
 
All is good and I am getting the results I expect, except for when I try and 
display images from my /main.jsp page. 
My image folder lives under the webapp eg:
/images
/main.jsp
/WEB-INF
etc.
 
In my jsp page I put the following:
<html:img srcKey="image.logo" width="79" height="46" altKey="image.logo.alt" 
border="0"/>
<html:img srcKey="image.logo1" width="79" height="46" altKey="image.logo.alt" 
border="0"/>
<html:img srcKey="image.logo2" width="79" height="46" altKey="image.logo.alt" 
border="0"/>
And the one that works is logo2 and here are the properties it reads.
 
image.logo=/images/nav_main_bkg.jpg
image.logo1=../images/nav_main_bkg.jpg
image.logo2=/uniquepear/images/nav_main_bkg.jpg

 
the other references to /images/nav_main....
../images/nav_main...
do not work, only the one where I force the /uniquepear/images/nav .... to it.
 
I do not like having to force the webapp in here. Why is this. Why won't it 
just behave properly.
 
In the page. "main.jsp" I am using the following base_href
<head>
  <html:base/>
  <title><bean:message key="title.login"/></title>
  <link rel="stylesheet" href="stylesheets/lsitestyle.css" type="text/css">
</head>
 
 
Does anyone know why I have to preface the /uniquepear to get the images to 
display?
 
Any help would be appreciated.
Thank you,
Scott

 
 

Reply via email to