tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <cmcclana...@mytownnet.com>
Subject Re: some cool hacking projects...
Date Thu, 14 Oct 1999 23:28:21 GMT
Talin wrote:

> OK, I've reviewed the docs for the jsp:include directive (I must have
> misunderstood it). However, it does seem a lot more heavyweight than the
> implementation I have. In particular, it would appear that it would have
> to re-dispatch an entirely new HTTP request, including re-parsing all of
> the parameters, headers, environment variables, etc.

That isn't what actually happens.

I've built the internal servlet engine logic to handle
RequestDispatcher.include() -- which is what <jsp:include/> uses under the
covers, since it generates servlets -- for a development version of Apache
JServ, and the effort is pretty lightweight.  I'm sure that Tomcat, and the
other servlet 2.1 implementations, do something similar.  In particular,
it's passing on the original HttpServletRequest and HttpServletResponse
objects with a few extra request attributes added (so that the called
servlet or page can see the parameters of the include call as well as the
parameters of the original request), so no reparsing is necessary.

> The component
> system, on the other hand, is little more than a simple subroutine call.
> Since we're trying to build a very high performance server here (i.e.
> millions of users), I don't think I would have gone with the jsp:include
> facility even if I'd known about it...
>

If your component system works for you, by all means continue to use it.
But it's certainly possible to build high performance implementations of the
standard servlet and JSP APIs as well, and apps built to these APIs will be
reasonably portable.  They also let you focus all your energy on
application-level stuff instead of system infrastructure stuff.

Craig McClanahan



Mime
View raw message