http is a stateless disconnect protocol. The browser requests resource from
server, server replies, connection is then disconnected. If you want the
server to pass another html file to the client with the new time, you have
to request the resource again (can be done automatically thru javascript),
or, instead of getting info from server side, you can do work on client side
with javascript instead (then you would not be displaying server time
though).
>From: Henki Lubis <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: timer problem
>Date: Fri, 23 Jun 2000 14:36:11 +0800
>
>guys .. i have a problem .. in my jsp page i am using timer like this
>
><%
> SimpleDateFormat _dateformat = new SimpleDateFormat ("EEEEEEEE,
>MMM
>d, yyyy G 'at' hh:mm:ss aaa");
> Date _currentdate = new Date();
> String _currentdatestring = _dateformat.format(_currentdate);
>%>
>
>and i put _currentdatestring like this
>
><p align="right"><font face="Verdana" size="1">Jakarta, <%=
>_currentdatestring %> (GMT+07.00) </font><font face="MS Sans Serif"
>size="1">
> </font>
>
>when i try to browse my page .. the second timer doesn't work properly ..
>it
>just show the second once . not every second .. and i have to refresh every
>second to make the second timer change every second .. any idea how to make
>it change every second ???
>
>
>regards
>
>Henki
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets