RE: Getting the date/time from the client

2006-07-11 Thread Tim Lucia
t; >> -Original Message----- > >> From: Vinu Varghese [mailto:[EMAIL PROTECTED] > >> Sent: Tuesday, July 11, 2006 8:05 AM > >> To: Tomcat Users List > >> Subject: Re: Getting the date/time from the client > >> > >> Thanks Pid, > >&g

Re: Getting the date/time from the client

2006-07-11 Thread Pid
, and my > clock set to Pacific Standard Time? Then what? (assume I am on the east > coast of the USA...) > > Tim > >> -Original Message- >> From: Vinu Varghese [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, July 11, 2006 8:05 AM >> To: Tomcat Us

RE: Getting the date/time from the client

2006-07-11 Thread Tim Lucia
5 AM > To: Tomcat Users List > Subject: Re: Getting the date/time from the client > > Thanks Pid, > > I think that is a good idea > Let me try > > - Regards > Vinu > > Pid wrote: > > you can get a Locale from the request, and adjust the time accordin

Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese
e: <% out.println(""); out.println("var currentTime = new Date();"); out.println("document.write(currentTime.toLocaleString());"); out.println(""); out.println(""); %> SK - Original Message - From: "Vinu Varghese&

Re: Getting the date/time from the client

2006-07-11 Thread Pid
out.println("Client time (long) " + time); >>>> out.println("Client time " + new Date(time)); >>>> } >>>> >>>> >>>> Is there any way to do this (get the client time from the request) ? >>>> O

Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese
="false" %> <%= application.getServerInfo() %> Current Time: <% out.println(""); out.println("var currentTime = new Date();"); out.println("document.write(currentTime.toLocaleString());"); out.println(""); out.println("

Re: Getting the date/time from the client

2006-07-11 Thread Pid
ote: >>> Vinu >>> Yeah, you are right about it, I can't get getDateHeader working. >>> >>> For the solution one, I have setup like this for jsp and worked. >>> >>> <%@ page session="false" %> >>> >>> >

Re: Getting the date/time from the client

2006-07-11 Thread Jon Wingfield
t; <%= application.getServerInfo() %> Current Time: <% out.println(""); out.println("var currentTime = new Date();"); out.println("document.write(currentTime.toLocaleString());"); out.println(""); out.println(""); %> SK - Origin

Re: Getting the date/time from the client

2006-07-11 Thread Shinya Koizumi
al Message - From: "Vinu Varghese" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, July 11, 2006 2:23 AM Subject: Re: Getting the date/time from the client SK, That javascript prints the current client time. But I want the client time with the request. T

Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese
t;); out.println("document.write(currentTime.toLocaleString());"); out.println(""); out.println(""); %> SK - Original Message - From: "Vinu Varghese" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, July 11, 200

Re: Getting the date/time from the client

2006-07-11 Thread Shinya Koizumi
out.println("var currentTime = new Date();"); out.println("document.write(currentTime.toLocaleString());"); out.println(""); out.println(""); %> SK - Original Message - From: "Vinu Varghese" <[EMAIL PROTECTED]> To: "Tomcat Users Lis

Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese
Thanks SK, I tried the second solution , but request.getDateHeader("Date") returns -1 . Also I didn't understand the first solution ( embed a javascript), Can u pls elaborate that. Thanks and regards Vinu Shinya Koizumi wrote: One is to embed javascript in the output out.println("JavaScrip

Re: Getting the date/time from the client

2006-07-11 Thread Mr Alireza Fattahi
Hi, May be you can use: request.getDateHeader() Have a look at, there is a related thread there: http://www.theserverside.com/discussions/thread.tss?thread_id=38542 Vinu Varghese <[EMAIL PROTECTED]> wrote: Hi All, I am doing a project in jsp/servlet and tomcat, which requires to take the cl

Re: Getting the date/time from the client

2006-07-11 Thread Shinya Koizumi
One is to embed javascript in the output out.println("JavaScriptExample"); out.println(""); out.println("function back() {"); out.println("history.back(-1);"); out.println("}"); out.println(""); out.println(""); The other solution is to get it fro