bhavya raj,
Welcome to JavaRanch.
Don't worry about your English. It's much better than my (name a language)...
If you can, however, we would appreciate it if you would spell words out completely ('Plz' is not a
word. Use 'please'). Contractions such as 'plz' or 'u r' instead of 'you are' confound language translation software and make it difficult for folks without your english speaking abilities to read your posts.
When dealing with long running processes, it's a good idea not to count on the user keeping their browser open while the process runs. Some browsers will time out on the user leaving them disconnected from what the server is doing.
Two common approaches are to:
1.) Let the user kick off the process, return them immediately to a message screen, and then have the back end send them an email when the process has completed.
2.) Let the user kick off the process, return them immediately to a screen that refreshes (using a meta refresh tag or javascript). Each time the page refreshes, it can check on the status of the server side process. If the process is done, forward them to a page that will allow them to retrieve the report, else, keep forwarding them to the refreshing status page.
I have an example of the second approach on my site.
http://simple.souther.us/not-so-simple.html Look for "Long Running Process"
[ May 18, 2006: Message edited by: Ben Souther ]