aspose file tools
The moose likes Struts and the fly likes Problem when refresh the page in WebLogic 8.1 Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Problem when refresh the page in WebLogic 8.1 Struts" Watch "Problem when refresh the page in WebLogic 8.1 Struts" New topic
Author

Problem when refresh the page in WebLogic 8.1 Struts

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
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
Corneil du Plessis
Greenhorn

Joined: Feb 12, 2004
Posts: 13
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.
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
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 ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem when refresh the page in WebLogic 8.1 Struts
 
Similar Threads
Prob while refresh the page in weblogic8.1 workshop
form should be submitted only when click on submit button
Disable Refresh Button of IE ??
form is getting submitted when 'Refresh' button on the browser is clicked.
from is getting submitted when 'Refresh' button is clicked