• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF single controller servlet  RSS feed

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just starting to delve into JSF. I read a user post (I think maybe on theserverside.com) that criticized JSF because you are forced to use a single servlet to process all requests.
Can anyone comment on the validity of that statement?
 
Author
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Blake Minghelli:
I'm just starting to delve into JSF. I read a user post (I think maybe on theserverside.com) that criticized JSF because you are forced to use a single servlet to process all requests.
Can anyone comment on the validity of that statement?



Is it a valid statement? Yes. The JSF specification requires that all requests for JSF views go through the single JSFServlet, which sets up the JSF environment and delegates the processing to the requested view.

Is that a problem? Of course not! I don't know why the user you quote used this to critize JSF, but I'm seen other misguided souls think that forcing all requests through a single servlet results in a bottle neck. That's totally wrong. A servlet is multithreaded, so it handles as many concurrent requests as the server can handle. Using more than one servlet, on the other hand, theorethically has a performance impact because of increased memory usage and more context switching.

Note that Struts, Tapestry and probably most sother ervlet based frameworks also use a single servlet as the entry point; this is common practice.
[ June 12, 2004: Message edited by: Hans Bergsten ]
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Hans, that's good to confirm what I thought as well. Especially since, in the past, I have developed a couple of applications that use a single controller servlet to handle all requests.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!