views:

179

answers:

1

I am using the html:image tag to include images in the jsp. the image location is specified in the message resource properties file of struts. the paths are defined as ../../images/image1.gid previously. now the context is changing due to some reason, so the images are not being loaded. how do i access the context path in the message resource file? i tried key={0}/images/image1.gif, but this works only for the bean:message as it contains arg0 attribute. but how i do for the image? any round about way?

PS: <img src=<bean:message arg0="<%=request.getContextPath()%>" key="image1"/>> works. but i cant change in 100s of jsp files which uses html:image.

thanks V

A: 

but i cant change in 100s of jsp files which uses html:image.

Use a text editor with Find & Replace in All Open Files facility, like Editplus and Notepad++.

BalusC