This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Image not displayed in the browser

 
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 ]
 
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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
 
Marshal
Posts: 67273
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
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...
 
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
Marshal
Posts: 67273
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!