Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem in Displaying image in JSP

Posted on 2011-09-13
8
Medium Priority
?
206 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:Gurvinder Pal Singh
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:Gurvinder Pal Singh
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:
Gurvinder Pal Singh earned 2000 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:Gurvinder Pal Singh
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

609 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