473,574 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

keep track of auto refresh in jsp page

34 New Member

I have designed a jsp page. This jsp is able to auto refresh after 5 second.
But i want after 5th times of auto refreshment the table present inside the body should change.

Can anybody help me out.
My code is ::

<%@ page import = "example.*, java.util.*, javax.servlet.h ttp.*" %>

<%! int i=0;
int cnt=0;
<title> Info </title>
<meta http-equiv="refresh" content="5;url= index.jsp">

<body bgcolor='#0cd2f f' >
<table align='center' width='50%'>
<tr><td align='center'> <font color='#af0002' size='8'><h1>xx xx</h1></font></td></tr>
<tr><td align='center'> <br /></td></tr>
<tr><td align='center'> <font color='#af0012' size='5'>Inform ation</font></td></tr>

<% out.println(cnt ); %>
BSInfoBean bsinfobean=null ;
ArrayList infolist = null;
ArrayList bsinfo = null ;
ArrayList msinfo = null;
bsinfobean = new BSInfoBean();
infolist = (ArrayList) bsinfobean.retr ieveRecord();
bsinfo = (ArrayList) infolist.get(0) ;
msinfo = (ArrayList) infolist.get(1) ;
//response.setHea der("Refresh", 60);
<table bgcolor ="#feeab1" border="1" width= "75%" align='center' id = "bsinfotabl e">
<td align='center'> <%=bsinfo.get(0 ) %> </td>
<td align='center'> <%=bsinfo.get(1 ) %> </td>
<td align='center'> <%=bsinfo.get(2 ) %> </td>
for(int i = 1; i<=cnt ; i++) {

<td align='center'> t<%= i %></td>
<td align='center'> <%=msinfo.get(0 ) %> </td>
<td align='center'> <%=msinfo.get(1 ) %> </td>
<td align='center'> <%=msinfo.get(2 ) %> </td>
if( i == 5 ) {

May 16 '08 #1
1 3016
2,364 Recognized Expert Top Contributor
Pushing it forward:-)
Jun 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Alex Thomas | last post by:
This is my problem. I want to submit a form to another page to process the data from said form. Then the person can go on to another part of the site or another site altogether. However If the person later clicks the <back button> enough times they will arrive back at the page that processed the data the first time and the same data will...
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a recordset table on the 2nd graph page and because the user gets to it by clicking the graph, the page doesn't properly post to render the recordset table....
by: blu3g85 | last post by:
how to redirect a page? as in after a few sec, the page will auto direct u to another page. ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
by: MattB | last post by:
I have a page I've migrated from HTML to asp.net that would auto-refresh every 30 seconds. I did this by putting the following in the <head> section: <meta name="refresh" content="30"> But now that it's an aspx page it doesn't seem to refresh anymore. Is there an asp.net equivalent to this or some kind of adjustment I need to do to make it...
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would be appreciated. Thanks, Brian
by: jack-e | last post by:
How do I auto refresh a page a particular time of the day?
by: tinuananster | last post by:
Hi, I need to auto refresh a page after a specific time interval. When the page is accessed the first time, a request parameter is null and hence it gets redirected to a welcome page (static html). When user clicks on a link from the left menu, i take the ID passed during the click and the page is redirected to a jsp that has information...
by: lezzo | last post by:
Hi Guys, I am new to this forum and find very interesting. I need your help in one of the script. I got a MySQL table bid_amount, and i want that if some new data comes in this table and where the table data is shown on webpage, that webpage need to be auto refresh. To make it more easy to understand
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a web page that has a TreeView on it. If I DONT'T expand the TreeView nodes, the auto refresh works nicely: my page gets refreshed every minute. As soon as I expand a node on the TreeView, the page stops auto-refreshing. Any ideas why this is happening? I have acheived auto refresh using the following:
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.