tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Interesse Michelangelo <M.Intere...@netsiel.it>
Subject R:[PROPOSAL] Re: <Servlet> tag
Date Sat, 12 Feb 2000 18:13:24 GMT

> ----------
> Da:	Hans Bergsten[SMTP:hans@gefionsoftware.com]
> Risposta a: 	tomcat-dev@jakarta.apache.org
> Inviato:	sabato 12 febbraio 2000 5.06
> A:	tomcat-dev@jakarta.apache.org
> Oggetto:	Re: [PROPOSAL] Re: <Servlet> tag
> 
> "Daniel L. Rall" wrote:
> > 
> > > JSP has another mechanism for this (<jsp:include>, as others have
> pointed out),
> > > 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 you
> > > would  have to use a prefix, e.g. <foo:servlet>, and XML syntax so it
> would still
> > > 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" />
>   </foo:servlet>
> 
> 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>
>   </servlet>
> 
> into
> 
>   <jsp:include page="/servlet/myServlet?aParam=aValue" flush="true" />
> 
may be better (more verbose, but clearer and safer - remember URLencoding):
	<jsp:include page="/servlet/myServlet" flush="true" >
		<jsp:param name="aParam"  value="aValue" />
	</jsp:include>
... in the full JSP style: love it or hate it !!!

--------------------------------------------------------------

About the general discussion, I'd like to notice the following:

*	in all the SSI examples (<servlet> tags) I found on the net, I have
always been able (so everybody else can be) to convert them easily in their
<jsp:include> equivalent tags;
*	no violation can be made in the T. implementation to the JSP spec.;
*	the T. documentation should explicitly emphasize how to convert
frequently used and not supported tags, and possibly deprecated ones, into
equivalent but valid ones.

I hope to have contributed to clarify the matter and possibly .... to end
the case ;-)




> Hans
> -- 
> Hans Bergsten		hans@gefionsoftware.com
> Gefion Software		http://www.gefionsoftware.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
>  
> Michelangelo Interesse
> ----------------------------
>       Process Support Systems
>                Netsiel S.p.A.
>       * ++39-080-5092.220
> ----------------------------
> 
> 
>  
> Michelangelo Interesse
> ----------------------------
>       Process Support Systems
>                Netsiel S.p.A.
>       * ++39-080-5092.220
> ----------------------------
> 

Mime
View raw message