Skip to Content
author's profile photo
Former Member

Problem finding image

Hi

I want to add an image to my portalcomponent that I have developed in Eclipse. I put the image in the images folder of the project. Add the code to the JSP:

String ImageURL = componentRequest.getPublicResourcePath() + "/images/head_group_ien.gif";

<hbj:image

id="Image"

width="253"

height="50"

src="<%= ImageURL %>"

alt="">

</hbj:image>

This according to the example that can be found in the portal 6.

Deploy the component to the portal.

Result: image is not displayed. When I check on the properties and the URL address it shows:

file:///C:/usr/sap/POP1/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/portalapps/PublishingTool/images/head_group_ien.gif

I open the source of the jsp page in the browser, copies the adress and paste it into an explorer window at the server. And I find the image.

Anyone that have a clue?

Brgds// -Fred

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Jan 29, 2004 at 09:44 AM

    _

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 29, 2004 at 11:34 AM

    Have you tried this code

    <% String ImageURL = componentRequest.getWebResourcePath() + "/images/"; %>

    Best Regards

    Pankaj

    Add comment
    10|10000 characters needed characters exceeded