• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pass value to update jsp  RSS feed

Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am doing some process in a servlet such as inserting and I want to display the number of records that have been inserted from time to time in JSP page. I found that it can be done using following code in JSP.
for (int x=0; x<100; x++) {
<b>X is now <%=Integer.toString(x)%></b><br>
try { Thread.sleep(1000); } catch (Throwable t) {}
The problem now is that I want to pass the number value which is the number of records inserted to the JSP from servlet. But if I use the following code to pass data
with variable insnum being the number passed, I think after the value is passed the JSP will display the insert status one time only and not continue to update itself. I do not want to put all the insert coding into jsp page. Any ideas? Thanks.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!