Search code examples
jsfejbentry-point

Start webapp (EJB3+JSF2) with method from bean instead of page


I'm pretty new to EJB + JSF and I'd like that my webapp's entry point would be a method of a bean instead of a view.

I mean, when someone types www.mypage.com I'd like it to go to a method of a bean and then be redirected to a view rather than go to any xhtml... how can I do this?

EDIT:

I need to load some data from the database to show it in the view that the user sees when he enters the app. It's not authentication, it's just that I need some data to be loaded before the user sees the website.


Solution

  • Annotating the method that loads the info with @PostConstruct gets the work done :D Thanks to Luiggi Mendoza http://stackoverflow.com/users/1065197/luiggi-mendoza