0

Hi I am learning JSF recently.. I have been going through this link for some interview questions. Spring Vs JSF

In this link they sated that Spring used Depenedency Injection whereas JSF deosent,

What is my doubt is, I think JSF using Dependeny injection How I am saying is

1) when we create @ManagedBean or any configurations for beans we configure faces-config.xml those classes or beans or actually Dependency injected by jsf right ? (Correct me if I am wrong)

2) And when we use @ManagedProperty to inject another MangedBean into a ManagedBean this is also some kind of Dependency Injection right ?

Please explain am I having wrong perception on JSF managed beans ?

Community
  • 1
  • 1
Rookie007
  • 1,229
  • 2
  • 18
  • 50
  • 1
    That blog contains crap here and there. Please learn JSF by Oracle's own tutorial and/or a real book. Here's a good starting point http://stackoverflow.com/tags/jsf/info – BalusC Jul 12 '15 at 07:30
  • So you agree that JSF used Dependency Injection ? and thanks for your suggestion I was just going through some interview questions anyway I will learn from oracle – Rookie007 Jul 12 '15 at 07:43
  • JSF does it differently from Spring, this is most likely where blog author was confused by. And, blog author seems to be erroneously comparing JSF to Spring DI instead of CDI/EJB to Spring DI. – BalusC Jul 12 '15 at 07:46
  • @BalusC Thank you for that link .. Somehow i couldnt find that link.. That explains alot – Rookie007 Jul 12 '15 at 08:00

0 Answers0