472,373 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,373 software developers and data experts.

keep track of auto refresh in jsp page


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.http.*" %>

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

<body bgcolor='#0cd2ff' >
<table align='center' width='50%'>
<tr><td align='center'><font color='#af0002'size='8'><h1>xxxx</h1></font></td></tr>
<tr><td align='center'><br /></td></tr>
<tr><td align='center'><font color='#af0012'size='5'>Information</font></td></tr>

<% out.println(cnt); %>
BSInfoBean bsinfobean=null;
ArrayList infolist = null;
ArrayList bsinfo = null ;
ArrayList msinfo = null;
bsinfobean = new BSInfoBean();
infolist = (ArrayList) bsinfobean.retrieveRecord();
bsinfo = (ArrayList) infolist.get(0);
msinfo = (ArrayList) infolist.get(1);
//response.setHeader("Refresh", 60);
<table bgcolor ="#feeab1" border="1" width= "75%" align='center' id = "bsinfotable">
<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 2936
2,364 Expert 2GB
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...
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...
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==----...
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...
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...
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...
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.