• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does Number of Servlets affetcs Performance....

 
senthil nathan
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing a application which has 7 screens.We are coding in the following manner.
Control will come to Servlet and this servlet will decide from which screen control came from and we will send the request to Business Object(BO) class where database connections will be done and datas will be retreived and stored in a bean.Now control will return to the same servlet.now i should transfer the control to the jsp for presentation.The problem is i was asked to write one servlet which transfer control to corresponding BO class and link to jsp.Reason tehy are saying is they are reducing the number of servlets...Any way we are going to convert it into WAR file or so...So does the Number of Servlets really is a concern....
URGENT...
Thanks in Adv.
Senthil
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having one or a dozen servlets should not make any difference in response speed as long as the single servlet doesn't grab resources it doesn't really need for a particular request. In other words, the servlet should not grab a db connection unless you need it, etc. - sounds like you have already taken care of that.
Having a single servlet will probably be easier to debug.
Bill
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"senthil nathan2002"-
Welcome to the JavaRanch! Please adjust your displayed name to match the JavaRanch Naming Policy.
You can change it here.
Thanks! and again welcome to the JavaRanch!
 
sandy gupta
Ranch Hand
Posts: 228
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel that having multiple servlets is a better idea(unless u feel like annihilating the web servers resources with servlets) as it is easier at the time of debugging if u have different controllers. That way, u can get one of the business units out of the picture if it starts giving a problem, debug it and then put it back in, unlike the other case where all u'r BO's will depend on 1 servlet.
This is one of those business decisions where the designers acumen and the years of experience play a vital role.
S
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic