This could be used in place of any standard server that you wish to use.  You
can create your own set of classes inheriting from the base servlet class with
methods and listeners based on xml configs and such to handle pretty much any
operation.  Just as an example you could have a servlet based ftp server.  This
could be configured to add/remove restrictions or change virtual paths just by
simply altering the config file.  Also you could distribute the server with
your own .war type of files.

Anyway, that was just a simple example.  Just because it's only primarily used
for http right now doesn't mean that that's all it's good for.

As opposed to just using Java classes?  Well, servlets really are just java
classes.  The nice thing is that you have the container which handles class
loading, threads, permissions, etc already for you.  Up to you.

Hope this helps,
Matt


Quoting souravm <[EMAIL PROTECTED]>:

> Hi Peter,
>
> No. I'm talking about a servlet behaving as a non-HTTP server. This is
> something discussed in example 10-8 and 10-9 in section 10 of the book
> Java Servlet programming by Jason Hunter.
> This servlet, in its init() method, spawns a thread which opens a
> socket
> connection and listens for any non-HTTP request (or a protocol
> independent request).
>
> Actually I'm confused - what can be an use of such a servlet.
>
> Regards,
> Sourav
>
> -----Original Message-----
> From: Peter Huber [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 4:37 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Using Servlet as a non-http server
>
>
> I think it's quite a problem to leave http protocol behind but use
> servlet
> further.
> The servlet container needs url information from the "GET" or "POST"
> header to
> find the corresdonding servlet. So the request is restricted to obey
> http
> request rules.
> I think your question is about a none "html" server, isn't it? One
> example
> application for using a servlet serving XML output is a Flash- or
> Applet-client.
>
> Peter
>
> souravm wrote:
>
> > Hi All,
> >
> > Can anyone tell me what advantage one can get in implementing a
> non-http
> > server using Servlet instad of implementing the same using simple
> Java
> > class.
> >
> > Regards,
> > Sourav
> >
> >
> ________________________________________________________________________
> ___
> > 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
>
> --
>
> Peter Huber
> (IT Consultant)
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> Gauss Interprise Consulting AG
> Gesch�ftsstelle M�nchen
> Witneystr.1
> D-82008 Unterhaching
> Telefon: +49-89-66561 - 128
> Fax:     +49-89-66561 - 199
> e-mail: mailto:[EMAIL PROTECTED]
> Germany Web: http://www.gi-consulting.de
>
> ________________________________________________________________________
> ___
> 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
>
> ___________________________________________________________________________
> 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
>

___________________________________________________________________________
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

Reply via email to