File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Pass value to update jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Pass value to update jsp" Watch "Pass value to update jsp" New topic

Pass value to update jsp

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
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.
I agree. Here's the link:
subject: Pass value to update jsp