Solved

Problem in Displaying image in JSP

Posted on 2011-09-13
8
202 Views
Last Modified: 2012-06-27
Hi Experts...
I am using a unix file system.
I've got a little problem in a portlet: I want to display in a JSP an image but I think I'm using the wrong way... In the JSP I use this tag:

<img src="/duj/tmp/WEB-INF/sig/graphs/smile.jpg">

but ,in the JSP page, the result is a white small icon with a red cross in the middle.
Please help...
0
Comment
Question by:gaugeta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36528712
it is suppose to be the relative path, so make it
<img src="./sig/graphs/smile.jpg">

Assuming that JSP is also in the WEB-INF folder only
0
 

Author Comment

by:gaugeta
ID: 36528816
@gurvinder372:No its outside the WEB-INF folder.
Please help...
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36528837
Okay, yes HTML/JSP should be outside the WEB-INF folder only, and so should be the image

make an images folder outside the WEB-INF folder at the same level as JSP, and keep the image there

<img src="./images/smile.jpg">
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:gaugeta
ID: 36528862
@gurvinder372:I do not have permission to do so.I f a valid reason is given may be it can be done.
So why is this thing not working.
Please help...
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36528883
Because client files (html, javascript, css) doesn't have the access inside WEB-INF
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36529255
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36540747
Is your issue resolved? Let me know the status
0
 

Author Comment

by:gaugeta
ID: 36910508
@gurvinder372:The issue is resolved thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question