Servlet question

B

Beatrice Rutger

Hi ,

Is it possible to have a servlet listen to a specified port?. Any
examples of how to do this (or links to examples) would be great.

I have not had much success having this question answered, or finding
examples when searching via Google.

Thanks
 
K

kaeli

Hi ,

Is it possible to have a servlet listen to a specified port?.

In general, servlets don't listen to a port. The web server listens, then
passes off the request to the servlet container.
You can set up a web server to run on any port you like. You may even be able
to set up the servlet container separately if you use Tomcat or the like.
As to just setting the servlet to do it all by itself, I don't think you can.
It needs the servlet container to do its job. So at the minimum, the servlet
container would be listening to the specified port.

Perhaps a web service would be more appropriate for your task?

--
--
~kaeli~
"No matter what happens, somebody will find a way to take
it too seriously."
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top