RedirectingActionForward Or a Thread Or ....


Web tier: servlets, JSP, Web frameworks: RedirectingActionForward Or a Thread Or ....

  1. RedirectingActionForward Or a Thread Or .... (5 messages)

    I am displaying some records on a which are fetched from database. This page is refreshed every 2 minutes as the client wants the latest data to be displayed. On the same page, an Export button is displayed to the user. Clicking on this button will fetch and export all the records to an excel. Problem is that if the fetching and exporting activity take more than 2 minutes then this activity is aborted and the page refreshes. Please give me how to go with it. We are using struts. Thanks
  2. Are you using refresh header or meta tag ?
  3. I am using meta tag.
  4. Any suggestions..
  5. Problem is simple.. use AJAX to fetch records. And dont use the META refresh. Use Javascript to refresh every two minutes. You can use settimeout inside a function that fetches the data. This way after you fetch the data it will wait for next 2 minutes for next refresh. Using Ajax will improve the performance but still if you want to improve it further then Code your actions and JSP in such a way that they return XML instead of HTML. Use an XSLT transformation on the screen to display the result.
  6. Hello Krishna, Thank you very very much...