This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi All, How can i do in jsp(actually this is on html) to be submitted only when i click the submit button?Right now, i already submitted the form and then press the refresh button of the browser it is submitted again. I am using WebLogic8.1 workshop and Struts Framework. How can i prevent this one? Thanks Bikash
When you press the refresh button it will refresh the current request. Your current page is a response from a 'post' of the previous page. If you want the customer to be able to refresh the screen you must use redirect=true in you forward mapping in Struts. The response is then a result of a separate get operation. It also means that the form will have to be in session scope and not request scope. If you want to prevent the customer from refreshing and thus re-submitting you should put a property in your form that indicates the state so the your validate can produce an error. You must remember that if the form is submitted the Struts controller will assign the request parameters to your form and then call validate, it may overwrite something you want preserved.
Joined: Dec 04, 2001
Hi, Actually I have tried with below code in .jpf file.
I am using weblogic8.1 workshop. I am not giving any mappings. That mapping will do automatically in workshop itself.
If any other solutions pls guide me. Thanks Bikash [ March 02, 2004: Message edited by: Bikash Paul ]