Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image Does Not Get Picked Up

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the Struts framework. I have an image and this is my image tag:

<html:img page="/HSInfo/frame/common/images/dhs-header-title.JPEG" border="0" width="800" alt="[infomation]"/>

The image does not get picked up in the browser. Therefore, only the text "information" is shown.

HSInfo is the name of my application and it is right under the $TOMCAT/webapps directory.

Because the image does not get picked up, I right click in the browser to "view source" to get a clue. The source code shows page="/HSInfo/frame/common/images/dhs-header-title.JPEG"

The image dhs-header-title.jpeg is in the folder that I specified. The spelling is correct. And the extension is .jpeg

What else could cause that the image does not get picked up?
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get rid of the "/HSInfo" part of your file path.

Starting a file path with a "/" means that the application will start looking for the file from your web application's root directory (which for you is HSInfo), NOT Tomcat's "webapps" folder.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic