I am developing a Web Cient to retrieve the data from the database
server using JSP and Java.
I know I can use "new Date()" to get the time of the Web Client. But I
don't know how to get the server time from Web Client? Any clue of how
to get the server time from web client?
Thanks for your help!
Chris Smith - 18 Oct 2005 23:52 GMT
> I am developing a Web Cient to retrieve the data from the database
> server using JSP and Java.
>
> I know I can use "new Date()" to get the time of the Web Client. But I
> don't know how to get the server time from Web Client? Any clue of how
> to get the server time from web client?
HTTP doesn't have any kind of built-in mechanism for retrieving the
current time from a web server. Either the server needs to be running a
different protocol (such as NTP or timeofday) that fills that need, or
you need to provide that functionality yourself (e.g., with a servlet or
JSP).

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Roedy Green - 19 Oct 2005 04:08 GMT
On 18 Oct 2005 15:13:27 -0700, haomingzhou@hotmail.com wrote or quoted
>I know I can use "new Date()" to get the time of the Web Client. But I
>don't know how to get the server time from Web Client? Any clue of how
>to get the server time from web client?
send it in a transaction.
or use NTP see http://mindprod.com/Jgloss/ntp.html
See the source code for SetClock. See
http://mindprod.com/products1.html#SETCLOCK

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.