Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Update information in a JSP page

Posted on 2002-05-16
5
Medium Priority
?
190 Views
Last Modified: 2010-05-18
I want periodically update the information in a table on a jsp page by calling an method. Is there a timer in JSP to help this?
0
Comment
Question by:pzhang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:raid999
ID: 7015296
Mate there is a class called Timer have alook at this
http://java.sun.com/j2se/1.3/docs/api/java/util/Timer.html
and this is really good too.
http://www.javaworld.com/javaworld/javatips/jw-javatip125.html
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 100 total points
ID: 7018836
for JSP to update a table automatically you have two options (I believe)

use a javascript timer and dynamcially update the table using DHTML.

or use meta refresh header tag.

CJ
0
 

Assisted Solution

by:mark_at_serialmonkey
mark_at_serialmonkey earned 100 total points
ID: 7038336
There are a couple of options.

1. Use a Javascript timer and refresh the whole page.
2. Use a META-Refresh tag
3. Use a Javascript timer and a hidden frame and update using DHTML.

The first two are good for largish refresh times (20sec, 30sec for example) and if all the data is on the screen at once (i.e. you have no scroll bar).

The last one is a must for small refresh times and scrolling because the first two options reload the whole page and such scroll the user back to the top of the page. Very annoying if the user is scrolled half way down and it keeps refreshing and sending them to the top.

The third one is using a hidden frame to constantly refresh using a Javascript timer. Each time it refreshes it checks to see if the page is loaded and then updates the table using DHTML. You have to be careful with DHTML as most of the solutions only work in Internet Explorer and there are retrictions on how tables work with DHTML.

A good site on how to use DHTML in IE is
http://msdn.microsoft.com/workshop/author/dyncontent/content.asp?frame=true
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9553795
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

"split between cheekycj  and mark_at_serialmonkey."
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kuldeepchaturvedi
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Let's take a look into the basics of ransomware—how it spreads, how it can hurt us, and why a disaster recovery plan is important.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question