tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Darrin Tisdale" <>
Subject Re: [tomcat-user] how to use generic servlets
Date Mon, 02 Jul 2001 00:38:59 GMT
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 
(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 

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

View raw message