Solved

Problem in Displaying image in JSP

Posted on 2011-09-13
8
199 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
  • 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

947 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now