Afroz,
500 records is a bit much ammount of data in one page.Your request is likely to be timed out.
I would recommend to use paging in you application. A quick search on same forum and
Jsp forum will give you a sufficient ammount of result for paging.
alternatively you can go for other options like you can generate PDF or Excel file server-side and user can download them
Shailesh