Re: Retreiving Server Time
From: nos (nos_at_nospam.com)
Date: 12/12/03
- Next message: Hrvoje Somun: "picture in application?"
- Previous message: Harold Ensle: "Class files for jsp"
- In reply to: Thomas A. Li: "Re: Retreiving Server Time"
- Next in thread: RadioFreq: "Re: Retreiving Server Time"
- Reply: RadioFreq: "Re: Retreiving Server Time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 12 Dec 2003 19:05:20 GMT
you probably don't need to know the time from NIST
because there is a good chance that your server is
synchronized with it via ntp so just use "date"
Besides if your server is synchronized, "date" will
probably give you a more accurate result than you
can do for yourself. Ntp sync takes care of packet
delay times.
"Thomas A. Li" <tli@corporola.com> wrote in message
news:SjkCb.3319$%TO.3130@twister01.bloor.is.net.cable.rogers.com...
> Check out java.sun.com for details on Java issues first:
>
> http://java.sun.com/developer/technicalArticles/Security/applets/
>
>
> "RadioFreq" <radiofreq@earthlink.net> wrote in message
> news:cR8Cb.10626$rP6.3279@newsread2.news.pas.earthlink.net...
> > Thanks Thomas,
> >
> > Security on my side or far side?
> > I do have a wireless network with a firewall, but I don't have any
> problems
> > with the application. Hmmm?
> >
> > "Thomas A. Li" <tli@corporola.com> wrote in message
> > news:ef8Cb.42542$3Eb1.9976@news04.bloor.is.net.cable.rogers.com...
> > > Security problem.
> > >
> > >
> > > "RadioFreq" <radiofreq@earthlink.net> wrote in message
> > > news:PE7Cb.10542$rP6.1503@newsread2.news.pas.earthlink.net...
> > > > I am writing an applet to display Julian Day and Time on a webpage.
I
> > have
> > > > all the code written except for a class to open a socket and extract
a
> > > > String with the time in it. I am getting the time from (NIST), a
> > > government
> > > > site.
> > > >
> > > > The problem that I am running into is that it seems that I can
extract
> > the
> > > > time from the server as application, but when changing the code so
> that
> > > will
> > > > run as an applet it hangs up. Here is a sample of the application
> code:
> > > >
> > > > import java.io.* ;
> > > > import java.net.* ;
> > > >
> > > > public class SocketTest{
> > > > public static void main(String[] args){
> > > > try{
> > > > Socket s = new Socket("time-A.timefreq.bldrdoc.gov",
13);
> > > > BufferedReader in = new BufferedReader
> > > > (new InputStreamReader(s.getInputStream()));
> > > > boolean more = true;
> > > > while(more){
> > > > String line = in.readLine();
> > > > if(line == null)
> > > > more = false;
> > > > else
> > > > System.out.println(line);
> > > > }}
> > > > catch(IOExeption e) {}
> > > > }}
> > > >
> > > > This works just fine, but when I try to change the app into an
applet,
> > it
> > > > does not work. Can someone offer their skills.
> > > >
> > > > Thanks
> > > > John
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Hrvoje Somun: "picture in application?"
- Previous message: Harold Ensle: "Class files for jsp"
- In reply to: Thomas A. Li: "Re: Retreiving Server Time"
- Next in thread: RadioFreq: "Re: Retreiving Server Time"
- Reply: RadioFreq: "Re: Retreiving Server Time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|