Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Servlet to poll Server

Status
Not open for further replies.

jo90

Programmer
Jun 19, 2002
30
GB
Hi,

I was wondering does anyone have any ideas how I would develop a java servlet to call/poll a Unix Server? Any tips/examples will be apreciated.

Thanks,
Joe.
 
Servlets only activate when their service methods are called by the web container. Do you want to a) just poll a unix server during a request, or b) continually to build up a profile?

a) in your service (post/get) method create a socket to the server in question, send it some data, and await a response (details depend on what protocol), or
b) create and start a thread that does what (a) does.

Be aware that your polling code should have a short time out because the browser will probably time out after 30 sec or so.

Marcin.
Light on the fizz so you can slap him down fast.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top