Subject: html:base misunderstood, broken, or misleading? From: Eric Rizzo <[EMAIL PROTECTED]> === I've got a problem using Struts under Jetty that I think is related to the <html:base> tag. The comments for this tag read: "Renders an HTML <base> element with an href attribute pointing to the absolute location of the enclosing JSP page. [snip] This tag is useful because it allows you to use relative URL references in the page that are calculated based on the URL of the page itself, rather than the URL to which the most recent submit took place (which is where the browser would normally resolve relative references against)."
But the <base> html element it generates does not point to the JSP page. It generates something like <base href="http://localhost:8080/appName/action.do"> which does not point to the JSP location as the docs indicate. Tomcat seems to deal with this fine anyway - I can use relative paths to other resources (CSS, images, other JSPs) or use the Struts custom tags to generate full "proper" paths to them. But when the app is run under Jetty, the relative references stop working. For example, something like this fails when /images is a sibling of /jsp: <img src="../images/foo.gif"> The problem seems to be that the request for foo.gif is sent back with a URL of "/images/foo.gif" although it should be "/appName/jsp/../images/foo.gif" or "/appName/images/foo.gif" My questions are: 1) Why does the <html:base> tag not work according to what is documented and expected? 2) Why would Tomcat not care but Jetty does? TIA, Eric -- Eric Rizzo Software Developer Jibe, Inc. http://www.jibeinc.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

