Pankaj Gupta wrote:
Hi,
I am using struts 1.3. I have kept jsp folder parallel to WEB-INF folder.
Inside jsp pages I have images folder, where I am keeping the images
referred by jsp.
In jsp I giving src of images as as : "images/image-1".
So when I access the jsp directly, then I can see the images.. But if try
to access it through action class
<action name="/Welcome.do >
<result = "Welcome.jsp">
</action>
then I can see the the jsp contents.. but not the image inside it.
That's because the image paths are relative to the page URL the browser
sees, not to the physical location of the JSP file. You have two simple
options:
1) adjust your relative paths so they are correct with respect to the
action URL
2) include an html:base tag [1] in your page header, which will allow
your relative paths to remain as they are now
L.
[1] http://struts.apache.org/1.3.8/struts-taglib/tlddoc/html/base.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]