I have an app where I query a db according to criteria selected by user on form page, and put the resultset into a ".csv" file for them to download. Form page on index.jsp, processing done in process.jsp.... If query returns no data, I show a message on form page next to dropdown telling user there's no data for that selection. If data returned, I send a redirect(from form page) to the url of the data file. The Windows "file download" system prompt comes up, user downloads file. Problem is, if a query returns data and there's a previous error message on the form page, the download prompt pops up, user downloads the file and message is still there. I want to refresh the form page prior to the download prompt popping up, so if data is returned, the error message goes away. Any advice will be much appreciated.
If an error doesn't mean anything to the user and should just be ignored, I would just not send it in the first place or clear it on the server if it was already there from before. I don't think you need to go the route of refreshing.
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad: