cancel
Showing results for 
Search instead for 
Did you mean: 

Access image from jspdynpage

Former Member
0 Kudos

I am trying to access the image from jspdynpage. I placed image at dist/images folder of my EP project. I export the par to the server. I used the src path for the img element is "images/demo1.jpg". It is displaying in my jsp page. Help is appreciated. I have another quesiton is that can I place all images in one of the directory. From jspDynpage can we access these images or not?

-Sudheer.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sudheer,

You could do the following.


<% String img = componentRequest.getWebResourcePath() + "/images/demo1.jpg"; %>
<img border="0" src=<%=img%> width="50" height="50">

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sudheer,

Yes you can place all your images in one folder and you can acess those images.

If the images are in same project then you just need to use the path as Prakash specified.

Otherwise you can put all the images in a folder in the server or in KM repository.

Regards

gEorgE

Former Member
0 Kudos

Hi Prakash/George,

I appreciate your responses. My question is I want to access images from my JspDynPage page from my test/images directory(the exact location is /usr/sap/test/images). Is it possible? I provided the exact path for img element of src attribute. it didn't work. Welcome for your Answers.

-Sudheer.

Former Member
0 Kudos

No you can't. JSP Dynpage doesn't have acess to the directory.