• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Problem when refresh the page in WebLogic 8.1 Struts

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic