Actually, the GenericServlet class forms the basis of a protocol-neutral
server-side application. Take a look at the documentation page in the JSDK
for javax.servlet.GenericServlet and javax.servlet.Servlet.
Think of what it takes to run a servlet under a web server:
- The web server intercepts the incoming HTTP message
- The web server relays this message to a "servlet engine" -- a piece of
code that is responsible for loading and running servlets.
- The servlet engine loads, initializes, etc. the servlet.
- The servlet, derived from HTTPServlet (itself derived from
GenericServlet) process the request and returns a response.
- The servlet engine relays the response through the web server.
You would still have to implement some sort of protocol-specific listener
(corresponding to a web server), and an application to load and unload
servlets (corresponding to the servlet engine.) You could then implement
either generic servlets or protocol-specific servlet subclasses.
If you write a monolithic application, you'll wind up doing most of the
same work in implementing a protocol listener, possibly loading and
unloading plug-ins, etc. So, if you want the most flexibility, I would
suggest writing a generic servlet engine, with plug-in front ends for
specific communication protocols and generic servlets on the back end.
...Richard
___________________________________________________________________________
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