• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image not displayed in the browser

 
pradeep vijayakumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am unable to get the image in the network when using jboss-4.0.0
this is the coding i am using
Many thanks for the reply
<html>
<head>
<title>Untitled Document</title>

</head>

<body>
<font color="#3366CC"></font>
<p align="center">
<font color="#4e773e" size="+4"><strong>Refined</strong></font>
</p>

<p> <a href="refinePD.jsp"><img src="Images/productDevelopment.gif" border="0"></a></p>
<p> <a href="refinePLA.jsp" title="Profit and Loss Analysis"><img src="Images/pla.gif" border="0"></a></p>
<p> <a href="refineAdmin.jsp" title="Refined Admin" ><img src="Images/admin.gif" border="0"></a></p>
</body>
</html>
[ August 22, 2005: Message edited by: Bear Bibeault ]
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try refering your image location relative to the web app context... like /Images/productDevelopment.gif
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the browser, right click on the broken image and view it's properties.
You now have the path that the browser is using when requesting the image.

Compare that with the location of your images directory on the server and see where you went wrong.

NOTE: the path (- domain) is case sensitive.
 
pradeep vijayakumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI this is the address in the URL http://localhost:8080/RefinedEu/Images/pla.gif

RefinedEu is the domain
And Images is the folder
pls help me out

Pradeep
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RefinedEu is the domain


I'm sure you mean context path, not domain.

As always, it's a very very bad idea to use page-relative urls in JSP pages. Always use server-relative urls to avoid running into trouble.
 
Choon-Chern Lim
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reference your image starting with your context path, like this: /RefinedEu/Images/pla.gif.

And like what Bear said, always use server-relative paths for your images, js, css etc...
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reference your image starting with your context path, like this: /RefinedEu/Images/pla.gif.


Just don't hard code the context path in case you or someone else decides to run the application from /rfe instead of /RefinedEu.

-Yuriy
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As in:



(assumes JSP 2.0)

P.S. I'd also ditch the mixed case in folder names and adhere to the convention of all lowercase.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!