Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

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

    _

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2004 at 11:34 AM

    Have you tried this code

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

    Best Regards

    Pankaj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.