• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSF single controller servlet

 
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
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.
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic