Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF with Servlets  RSS feed

 
Alan Duke
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is correct to use JSF with Servlets or JSF implements a controller like a Servlets? Thre is some tutorial about this?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The FacesServlet is the primary Controller component of the JSF MVC paradigm.

You can't have both FacesServlet and a user-written servlet process the same http request since only one servlet can handle a request. However, JSF is not jealous, and if a given task works better using just a straight servlet or even JSP, then that's no problem. They can even share objects, since the session and application objects are the same in JSF and servlets, except that JSF has the ability to automatically construct and initialize the objects if a JSF request needs them. Servlets have to do that kind of work the old-fashioned way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!