--

On Fri, 23 Jun 2000 14:36:11
 Henki Lubis wrote:
>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 ???
Why don't you try client side scripts....-- JavaScript for example --. It's a simple 
matter creating a time ticker with JavaScript.

Do you really want the user to refresh (by making request to server) the entire page 
just to see the second ticking ?
If that's what you want, then you could try an HTML attribute that tell the page to -- 
automatically -- refresh every specified seconds....

The JSP engine translate your code into servlet -- once. Then every time the client 
make a request to your jsp (by pointing his browser to your jsp page), that servlet 
will write the response (which in your case is the timestamp in server by the time 
that request is made) to the output stream. That's all about JSP. It's not its 
reponsibility to make the response repeatedly.

Kenken kabare .... di Bali ???
Salam buat bli John (I Gde Sumardika):) dari orang segul di Bandung..
thx
>
>
>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
>


Send FREE Greetings for Father's Day--or any day!
Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct

===========================================================================
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

Reply via email to