aspose file tools*
The moose likes Struts and the fly likes refreshing part of the JSP page without reload-kind of AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "refreshing part of the JSP page without reload-kind of AJAX" Watch "refreshing part of the JSP page without reload-kind of AJAX" New topic
Author

refreshing part of the JSP page without reload-kind of AJAX

sai kinnera
Ranch Hand

Joined: Aug 12, 2004
Posts: 52
Hi,
I have a main JSP for display of about 1000 records which is displayed fine
using a display table. I have another JSP included in this JSP which just gives the user a warning message (no of records also)using html:error tag.
<tr valign="top">
<td width="100%" colspan="5">
<div align="center">
<html:error/>
</div>
</td>
</tr>

For the 1000 records, I call the database once and for number of total records(generally>1000), I make another database call. As both the calls involve around 9 table joins, the page loading is taking a lot of time. I want to make 2 different actions for both the calls and refresh the message part after the page is loaded with the first query. I do not know if I can use AJAX for this. Can anybody help. Thanks in advance.
Sai Kinnera
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You might try putting your error message in an <iframe>. That way you can refresh it separately from the main page.


Merrill
Consultant, Sima Solutions
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Yes. you can use AJAX to achieve this. Refresh partial page using <div> tag and AJAX JS functions. Should be very easy.
Originally posted by sai kinnera:
Hi,
I have a main JSP for display of about 1000 records which is displayed fine
using a display table. I have another JSP included in this JSP which just gives the user a warning message (no of records also)using html:error tag.
<tr valign="top">
<td width="100%" colspan="5">
<div align="center">
<html:error/>
</div>
</td>
</tr>

For the 1000 records, I call the database once and for number of total records(generally>1000), I make another database call. As both the calls involve around 9 table joins, the page loading is taking a lot of time. I want to make 2 different actions for both the calls and refresh the message part after the page is loaded with the first query. I do not know if I can use AJAX for this. Can anybody help. Thanks in advance.
Sai Kinnera
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: refreshing part of the JSP page without reload-kind of AJAX