This is probably less a Struts question than it is an HTML question, but
I figured most here have dealt with this issue.

I'm a little confused by the <html:base /> tag. Lets say we have the
following directory structure WITHIN our webapp:

webapp
   - images
             - myimage.jpg
   - scripts
   - WEB-INF
           - pages
                  - test.jsp

Ok. Now I've got a jsp page that's in the webapp/WEB-INF/pages directory.
In that webapp, I've got the <html:base /> tag declared in the header.
Now, when I view source on my test.jsp page, I see this:

<base href="http://localhost/webapp/WEB-INF/pages/test.jsp"/>

Now, on that page, I want to reference an image in
webapp/images/myimage.jpg. I can get there by using:

href="../../images/myimage.jpg" 

But I'd rather not. Is there a way to get to the root of the webapp?
I've tried:

/images/myimage.jpg

And that doesn't seem to work.

-- 

Bryce Fischer <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to