Write a Java program that could run both as an applet (primary use) and as an application (secondary way of using). The applet should continuously monitor and display information who is currently logged in to the computer which provided the Web page with the applet.
In case of an applet, find out where the applet came from (docbase?) and connect to that system. In case of an application, please check for the command line parameter that would specify a network address of a computer. If no computer is specified then a dfault value (for example bobcat.bradley.edu) should be used. In case of any error display an appropriate error message isntead of list of users.
To save CPU resurces of both client and server computers please recheck for new users every fifteen seconds. (Use a thread to check and then update the list). You can display a new listing for example by using a scrollable readonly TextArea component that is updated every time a new list of users is available.
You can check for users using so called FINGER protocol (port 79). Please review your class notes or check an appropriate protocol descrition (for example RFC 1288) that is also linked from the example programs Web page.
Check it in advance! Please note that not all computers may have that feature enabled. Your applet must be posted on the Web page that is hosted by a computer that has that feature enabled. The following systems have that feature enabled: BOBCAT, HILLTOP . The following systems have this feature disabled: CEGT201, INTERLABS JCHAMP. The following systems have this feature restricted to local network users only: MTCO . Every student can have an account on BOBCAT. Please apply in advance because it takes about 24 hours to get an account there. If your program works as an application but you will not post it on the finger enabled Web server 3 points will be deducted.
Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e-mail to the instructor. Please set the message subject to: web-hw7.
Thank you.