Usual task: user query the database ,get the resultset. Results are showed in form of HTML table. Now if user want to sort the table based on another field/column, I have to query the database again. Because it takes long time to query the database. I am wondering if there's a way so that I don't have to requery the database and just sort the resultset? I think it's a very common situation java developer will face. Thanks in advance.