0 Replies Latest reply on Jan 24, 2003 9:50 AM by Robert Simmons

    Single Servlet vs Multiple Servlet

    Robert Simmons Newbie

      Greetings,

      I am developign a pretty rich web application that will be served by java servlets. The question to me right now is If I want ot go with single or multiple servlets.

      In all there will be about 50 commands that can be done to this servlet. If I put them all in one file it would violate my sense of object orineted engineering. So I thought of either makeign the various commands actually be in different classes and the servlet routing the requests to the proper command. The alternative is to make individual command servlets that have a common base class and sit on separate URLs.

      The problem with option two is that the servlet connects to EJB on the back end and could potentially hold onto allot of resources. The problem with option two, possibly, is federation. If there are hundreds of requests commin ing, will tomcat federate the servlet or pipe everythign through one hole?

      Comments?