on 01-29-2004 9:31 AM
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
Have you tried this code
<% String ImageURL = componentRequest.getWebResourcePath() + "/images/"; %>
Best Regards
Pankaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
_
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.