Catherine, you're right. What I described is only a supposed scenario. I would
like to contact the (threads of a) servlet from a third party (another process on
a remote machine) which should communicate using a port and a different protocol.
And the servlet should be able to receive the message and process it.
Is this theory possible or I should start looking for some other solutions? Got
one?


bye,
Robert


Catherine Jung wrote:

> This kind of idea can be used when you want to initiate a conversation
> with HTTP, but then transfer to a different protocol after the first
> contact - Jason Hunter's book has an example which does a similar this -
> Daytime server, which supplies the time using HTTP, raw sockets and RMI.
>
> Catherine
>
> >
> > Why would you want to have servlets listen at a port? Servlets are for a
> > webserver kind of environment which allows them to handle requests.
> >
> > Normally applications are the only pieces of code that should listen at a
> > port. When you listen at a port you create a server socket. Get a socket
> > from that and spawns threads that will handle that socket. It then continues
> > listening.
> >
> >
> > Thanks,
> > tanmay
> >
> >
> >
> > -----Original Message-----
> > From: R�bert P�rhonyi [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 31, 2000 8:44 AM
> > To: [EMAIL PROTECTED]
> > Subject: sockets and ports
> >
> >
> > Hi everybody,
> >
> > I have a servlet (and its running threads) which is listening a specific
> > portnumber. If a message comes in through this port who will get the
> > message? All the threads or just one of them and this one should
> > distribute it to the others?
> >
> > Thanx for your answer!
> >
> >
> > regards,
> > Robert
> >
> > ___________________________________________________________________________
> > 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

___________________________________________________________________________
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