tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: [PROPOSAL] Re: <Servlet> tag
Date Sat, 12 Feb 2000 04:06:14 GMT
"Daniel L. Rall" wrote:
> > JSP has another mechanism for this (<jsp:include>, as others have pointed
> > but if you really want this I suggest you use JSSI as the starting point and
> > adapt it for Tomcat as a separate page processor than a JSP add-on.
> >
> > Adding <servlet> as a JSP custom action doesn't make much sense to me, since
> > would  have to use a prefix, e.g. <foo:servlet>, and XML syntax so it would
> > not help people migrating from other SSI implementations.
> I did not realize that.  That rather negates the benefits of adding the
> SERVLET tag as an intrinsic feature.  Why must the <BAR:SERVLET> prefix
> and XML notation be used?  A single tag (with no prefix) seems like a
> rather trival thing to implement (no disrespect intended, I'm just
> trying to understand the reason behind this).

The prefix is how you associate a custom action with a tag library in JSP 1.1,
through the <%@ taglib uri="aTagLibrary" prefix="foo" %>. So all custom actions
must be used with a prefix. And all JSP actions, standard as well as custom,
use XML syntax, so your pages would need to look like:

  <foo:servlet name="myServlet">
    <foo:param name="aParam" value="aValue" />

See the JSP 1.1 spec for details.

Also, since JSP already provides the <jsp:include> action, adding another one
with the exact same functionality doesn't seem like such a good idea. But to
help people deploy existing servlet SSI apps in Tomcat, porting JSSI may be
worth it. An alternative is of course to make a program that converts SSI
pages to JSP pages, e.g. converts

  <servlet name=myServlet>
    <param name=aParam value=aValue>


  <jsp:include page="/servlet/myServlet?aParam=aValue" flush="true" />

Hans Bergsten
Gefion Software

View raw message