This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Image not getting displayed in JSP

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have to display an image in my page. Below is the code to get the image.

<IMG border="0" height=28 alt="image1" vspace="3"
hspace=5 src="<%=request.getContextPath()%>/hwa/images/image1.gif" width=170 >

request.getContextPath() is returning the correct context name and the path in which the image is also present is also perfect. But still the image is not getting displayed. Kindly help me out.

Thanks in advance.
 
Sheriff
Posts: 67620
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the hwa folder in the same folder as the WEB-INF folder? Can you type the same URL into the address bar and see the image?
 
Sat Nar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The hwa folder and the WEB-INF folder are present under the same folder. Kindly let me know what is the url you are talking about.

Note: The image was getting displayed in Weblogic 8.1. We upgraded to Weblogic 9.2. Now we are facing this problem.

Also, my ear has two war files. There is a link in the main application which then accesses the other war. The images in main application war file is getting diplayed properly. The images under the other war file is not getting diplayed properly.

Kindly help me out.

Thanks in advance.

[ November 12, 2008: Message edited by: Sat Nar ]
[ November 12, 2008: Message edited by: Sat Nar ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the backend servers changed? I mean if they are working on UNIX, then you need to consider the UpperCase/LowerCase because of Case sensitive.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic