bean method execution ..

Discussions

Web tier: servlets, JSP, Web frameworks: bean method execution ..

  1. bean method execution .. (2 messages)

    Hi !
    I call a bean's method from JSP which performs some change in the database. Then I should reload the page to make the change gets reflected. But the page gets reloaded before the change in the database takes place. Is there any way to find whether the bean's method is finished executed or not, so that only after the method gets executed, the page can be reloaded.

    Thanks
    Arun

    Threaded Messages (2)

  2. bean method execution ..[ Go to top ]

    How are you reloading the page?
  3. use MVC[ Go to top ]

    you should use the MVC design model (model view controller)

    you can have your controller (a jsp or servlet) redirect the user only after the database has been successfully updated. it sounds as if your code is organized so that the insert didn't finish in time for a user reload. the MVC design model can help in resolving application logic vs presentation logic issues.