Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Problem in Displaying image in JSP

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
gaugeta
Asked:
gaugeta
  • 4
  • 3
1 Solution
 
Gurvinder Pal SinghCommented:
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
 
gaugetaAuthor Commented:
@gurvinder372:No its outside the WEB-INF folder.
Please help...
0
 
Gurvinder Pal SinghCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
gaugetaAuthor Commented:
@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
 
Gurvinder Pal SinghCommented:
Because client files (html, javascript, css) doesn't have the access inside WEB-INF
0
 
Gurvinder Pal SinghCommented:
Is your issue resolved? Let me know the status
0
 
gaugetaAuthor Commented:
@gurvinder372:The issue is resolved thanks.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now