Announcement Announcement Module
Collapse
No announcement yet.
BACK Button Issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • BACK Button Issue

    in my web app i used spring-mvc hibernate integration.
    I used to save data in my student.jsp like "saveStudent.html"
    In controller also get the request and save data's.then show success page.
    but still url is "saveStudent"

    If I press F5 or refresh then again record data's save.
    after logout when i press back button then also show the previous data's.

    please give me a simple solution friends because i have not more idea about spring web flow & spring security.
    i heard about redirect & setCacheSeconds methods.are they good for my issue..?

  • #2
    If I'm not mistaken this is exactly what redirect is for. When you return a String from your submit method to forward to a success page, the user can still hit refresh or back and cause another submission (Browsers do tend to warn you about this). If instead you prepend "redirect:" onto your string, the browser will no longer resubmit the data on a refresh or hit of the back button.

    So if your string was
    Code:
    return "success";
    before, now it will need to read
    Code:
    return "redirect:success"
    I believe. Hope that helps.

    Comment

    Working...
    X