Skip to Content

Adding image HTMLB

where should we put the images in the par file. I added them in images folder but its not accessible when i use this

<hbj:image

id="Image"

tooltip="Thumbnails"

src="images/image.JPG"

alt="Image">

</hbj:image>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 05:38 PM

    Hi Sidhartha,

    Change the src attrib as follows,

    src="<%= componentRequest.getWebResourcePath() +\"/images/image.jpg\" %>"

    award points if this solves your problem.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 06:14 PM

    Hi Siddhartha,

    If you are using JSPDynPage and if you have JSP page, you can use the code given below in the JSP page. In import statement dont forget to import

    "com.sapportals.portal.prt.resource.*" package

    <hbj:image id="printIcon"

    tooltip="Print this report"

    alt="Print"

    src="" >

    <%

    IResource rs = componentRequest.getResource(IResource.IMAGE, "images/image.JPG");

    printIcon.setSrc(rs.getResourceInformation().getURL(componentRequest));

    %>

    </hbj:image>

    Hope this helps,

    Thanks,

    Praveen

    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.