Calling a method in backing bean whenever a page is loaded/reloaded

Hi,

What is the best way to call a certain method in a backing bean whenever the jsp page is reloaded?

I have a managed bean that provides the data for a form and the bean gets it's data from a SQL DB. I want the bean to reload the data from the DB when and only when the page is loaded or reloaded. (I.e. it should the call method loadData() )

What is the best way to do this?

/R

[412 byte] By [ricarlssona] at [2007-11-27 9:59:56]
# 1
If the bean is request scoped, just call the logic in the init block or in the constructor, or even in the accessor.If the bean is session scoped, call the logic in the accessor. http://balusc.xs4all.nl/srv/dev-jep-dat.html might give some insights.
BalusCa at 2007-7-13 0:31:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks!That link was very helpful!
ricarlssona at 2007-7-13 0:31:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...