On Wed, 11 Jul 2001, Young, Wayne wrote:
> I need to modify HtmlTag to output the .jsp name of the page that contained
> the <html:html> tag in a hidden field or comment. This is for debugging and
> also to link into our help system.
>
> Any ideas on how to do this from within doStartTag()?
>
You could do something like:
HttpServletRequest request = (HttpServletRequest)
pageContext.getRequest();
String requestURI = request.getRequestURI();
sb.append("<!-- PAGE: ");
sb.append(requestURI);
sb.append("-->");
just before the ResponseUtils.write() call.
Alternatively, you might consider just using the <html:base> tag in your
<head> section. This will render a <base> element that includes the
absolute path of the current page -- and, as an extra added bonus it will
make relative references to images and stylesheets work correctly, even
when you forward to this page from a Action.
> Thanks.
>
> Wayne
> [EMAIL PROTECTED]
>
Craig