You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Kelly Chen <ke...@tumbleweed.com> on 2003/01/10 03:26:56 UTC
Calling into Servlet Container without HTTP
Hi, there:
I am looking for a way to invoke a Servlet without going through HTTP. I
understand that this has to be container specific logic, so I would like
to do this on Tomcat 4.1.18.
The idea is to use JSP as a template system, but JSP has be to run
inside a Servlet Container. So I would like to be able to invoke JSP
through Tomcat and get result directly without going through HTTP.
I just wonder if anyone has attempt the similar task or has some points
to share.
Thanks.
--
Kelly Chen Tumbleweed Communication Corp.
T:650-216-2043 700 Saginaw Drive
F:650-216-2565 Redwood City, CA 94063
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Calling into Servlet Container without HTTP
Posted by Remy Maucherat <re...@apache.org>.
Kelly Chen wrote:
> Hi, there:
>
> I am looking for a way to invoke a Servlet without going through HTTP. I
> understand that this has to be container specific logic, so I would like
> to do this on Tomcat 4.1.18.
>
> The idea is to use JSP as a template system, but JSP has be to run
> inside a Servlet Container. So I would like to be able to invoke JSP
> through Tomcat and get result directly without going through HTTP.
>
> I just wonder if anyone has attempt the similar task or has some points
> to share.
I don't see that much benefit in avoiding HTTP, as there's a lot of code
there already, and the code is fast. What should be avoided are the
socket operations, which are expensive.
If you take a look at Coyote, you could write a new protocol handler
which would read/write HTTP stuff in memory, while reusing the
Http11Processor class.
Alternately, you can create a brand new protocol handler. That would be
the most efficient, and it's not that hard. You can use the JK and
HTTP/1.1 handlers as examples (but no, there are no docs right now).
Remy
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>