tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "D. Jay Newman" <>
Subject Re: [tomcat-user] how to use generic servlets
Date Mon, 02 Jul 2001 00:40:10 GMT
I'm sorry, but I agree with Nick.

My reading of the servlet standard does not force the protocol to be HTTP.

Theoretically the protocol could be anything that you want. You should be
able to rewrite sendmail using servlets (why, I don't know, but it should
be able to be done according to my understanding of the standard).

If this isn't being done for Tomcat, I volunteer to write a generic

So many people consider servlets and HTTP to be intimately connected, and
yet I think that is an accident of fate rather than part of the standard.

(I'm not being altruistic about volunteering -- I also need to have a
servlet without a known protocol and for the reasons that "tizzy?" suggests
it would be better to use a servlet rather than rewrite the server engine.)

I will reread the servlet spec tonight and make sure that non-HTTP protocols
are part of the spec.

> On Sunday 01 July 2001 01:05 pm, you wrote:
> > Hi,
> > all the literature i have just deals with HttpServlets and stuff, and
> > anyway: its not much literature.
> >
> > could someone give me a nice example how to write a web.xml in which i
> > can use my generic servlet which uses my own protocol?
> >
> > tia,
> >
> > nick
> web.xml is a standard file used by all servlet-powered systems.  You can find 
> the spec for it at the sun web site, where the servlet specification is 
> housed:
> (Available in many formats)
> Now, although your message was a bit ambiguous, if you use servlets, you must 
> adhere to HTTP protocol specifications.  
> You can still process the HTTP message using the service rather than doGet or 
> doPost calls if you wanna get closer to the implementation.  It is still HTTP 
> though.
> If you want another port, set it up in the tomcat or apache port listener.  
> Servlets can run on any port.  They are bound to their environment's ports, 
> through the web server instance.
> You can enclose any data you wish in the transaction, but the proper HTTP 
> headers and the like must be used by your protocol.  If it does not use HTTP, 
> then I suggest you write a socket server (in Java it's cake) and use your own 
> protocol.  You'll have to do a lot to get load balancing, etc., so you might 
> wanna consider just enabling it in HTTP.
> -- 
> . . . tizzy
> L'enfers, c'est les autres.
> --Jean Paul Sartre, Huit Clos

D. Jay Newman                   ! For the pleasure and the profit it derives              ! I arrange things, like furniture, and   ! daffodils, and ...lives.  -- Hello Dolly

View raw message