开发者

Image not displaying in jsp

I have my image placed in a folder called images in the netbeans web pages folder and the link to it in my jsp is in a div as shown below:

<div id="image">
  <p>
    <img src="${pageContext.request.contextPath}/images/vote_image.GIF"
         alt="banner"
         width=600px
         height=300px
    />
  </p>
</div><!--end of image div-->

The problem is the image just doesn't load in the browser. What could be the problem? I used the same code in linux and it used to load the image. Could it be a browser problem, I'm using firefox 3.6 which I don't think should have a problem. Please 开发者_高级运维let me know if any one has a clue as to why this is happening. If the problem is my code let me know how to adjust. Thank you


There are no units used in HTML width and height attributes.

<img src="${pageContext.request.contextPath}/images/vote_image.GIF"
     alt="banner"
     width="600"
     height="300"
  />

Without seeing the rendered source of the page, I'd guess that's your problem. If not, try inspecting your image in Firebug and post what its rendered source looks like.

Also, make sure case sensitivity is not in play: gif vs. GIF.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜