>>> Gokul Singh <[EMAIL PROTECTED]> 19-Sep-00 12:54:59 PM >>>
>But you can definately extend Generic servlet to handle
>ftp requests, in theory at least.
>I have never done this. Anyone else who can share some
>examples/Implementation of this.
It was originally thought that the servlet API would provide a basis
for implementations of nearlly all internet TCP based protocols. In
fact only one other than HTTP has ever been done, an SMTP
implementation by the Apache project called James.
Head over to http://java.apache.org/ for more information on James.
The servlet API has not mushroomed into other implementations because
of it's peculiarly HTTP architecture. The API has a concept of a
Request and Response (at the lowest level since this is how
javax.servlet.Servlet looks). Most internet protocols don't work like
that... most work on a session basis, including FTP.
What that means is that processing HTTP is thought of like this:
open connection
send request
process
send response
close connection
open connection
send request
.
.
.
whereas processing FTP or SMTP or IMAP is thought of like this:
open connection
send request "1"
process
send response
send request "2"
process
send response
.
.
.
close connection
For example in FTP one uses the command "cd" to change to a
directory, all subsequent command operate within that directory...
within HTTP that is impossible since there is no concept of a
session.
So, in the end, it is widely felt that the servlet API is just not
much use for protocols other than HTTP.
Even the Apache project hasn't pushed James - their SMTP
implementation.
Nic Ferrier
___________________________________________________________________________
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