At 06:38 AM 4/23/99 -0400, you wrote:
>I am trying to write a servlet that will connect to an NTP server. If I
can get this servlet running it will help me get servlets into the
mainstream of a predominantly MS company....
this will get you the time:
import java.io.*;
import java.net.*;
class DayTime
{
public static void main(String[] args)
{
try
{
Socket socket=new Socket("time-A.timefreq.bldrdoc.gov",13);
BufferedReader is=new BufferedReader(new
InputStreamReader(socket.getInputStream()));
for(;;)
{
String string=is.readLine();
if(string==null)
break;
System.out.println(string);
}
for(;;);
}
catch(IOException e) { System.out.println("Error" + e); }
}
}
and there is a nice example of an applet/servlet combination in "java
servlet programming"
http://www.amazon.com/exec/obidos/ASIN/156592391X/qid%3D924906510/002-223921
6-9288639
hth
Ray (will hack java for food) http://home.pacbell.net/rtayek/
hate Spam? http://www.blighty.com/products/spade/
___________________________________________________________________________
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