Hi I am working on creating a samll forum, which include some servlets. Once user posts data, he can hit 'sumbit' button ('in which case store()' is executed) or 'preview' button ('in which case showPreview()' is executed) in the following servlet. As you can see in showPreview() besides showing preview it also outputs 'sumbit' button and 'edit' button. While in preview scrren if user clicks on edit button it should go to 'http://localhost:8080/test/index.html'. I couldn't figure out how to do this. If he clicks 'submit' button it should call store method. If someone can help me with this i will appreciate it very much.