I am writing a jsp code where it displays cities upon selecting a state, which is through JDBC. I have placed a start over button in the end so that I could start the page again from the beginning. Is there anyway we could do this? Please let me know how i would approach. I tried removing attributes but that doesn't seem to be the solution. Any solution is appreciated. Thanks.
Thanks for the reply Bear.
I am actually using Websphere Portal on JSR 168 API. After clicking on the button above, I get the error from the server console as:
"WARNING: Cannot set header. Response already committed."
I tried to invalidate the session and redirect the page back to the jsp (now assuming all the session attributes were gone). But upon running and clicking on that button, the browser displays "Page cannot be found". I have set up a button at the end of my jsp saying "Start Over" so that upon clicking on that button, I should get the page as I first loaded from the server. I tried removing attributes but that doesn't seems to be the solution. I am new to programming so please bear with me if this looks stupid to you. Any reply is appreciated. Thank you.
Its a long code. This is how it works:
I click on a state, and the page displays its related cities.
I click on a city and it displays their zip codes.
I click on a zip code and it displays the temperature for all days.
I just made the connection and linked these tables with the help of SQL. I am not retreiving actual temperature.
In the end, I have a Start Over button. Upon clicking it, the page should redirect me to enter the state again (from beginning)
Here is my state.jsp code
And here is my Portlet class
I know its a very long code. If I don't get a reply on this, its fine because nobody wants to waste their time reading a long code. If you do, I would really appreciate your help.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com