Yes.
Import the com.oreilly.servlet.DaemonHttpServlet class and extend it in your
main class. Then create an inner class that extends Thread to start
listening for a client connection through a socket. The inner class is
instantiated by the main class when a client request is received. Jason
Hunter has an excellent example of this in "Java Servlet Programming" but I
don't have my copy with me right now so I can't reference the page numbers.
He called it something like "Daytime Server."
Cheers!
Mark
----- Original Message -----
From: "Ronen Portnoy" <[EMAIL PROTECTED]>
Sent: Sunday, August 05, 2001 6:43 AM
> i want to implement a servlet that handles both HTTP and raw tcp Sockets
connections,
>
> 1. is it possible ?
> 2. how can i make the servlet listen on a given port (how do i self
activate the servlet) ?
>
> ronen
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html