Solved

Problem in Displaying image in JSP

Posted on 2011-09-13
8
200 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Find out what you should include to make the best professional email signature for your organization.
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 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…

777 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