Multiple servlets vs parameterized service

I'd appreciate any advice/reccomendations anyone has on this topic

What are the trade offs in the following scenario where I have a set of related use cases I want my web app to handle. Is it best to have a servlet per use case (eg in a web store, I might have "buy item", "list products", "view cart") or is it best to have a single servlet and have that distinguish the particular use case from the URL/input parameters.

What are the overheads of multiple servlet objects in this scenario esp where as in the exampe above a "buy item" would affect the results of "view cart"

I realise I can use struts or similar to achieve the described effect, I'm more interested in the technical factors behind the choice above

thanks

[757 byte] By [hoprods09a] at [2007-10-3 1:34:15]
# 1

its better if u can have only 1 servlet for alll the use case.it can be your Controller and this is called MVC arch. If u use seperate servlet for each use case then u have to repeat generic code in each servlet and u also be writing the business in the servlet thats worng. u should write all the business in seperate class which may be reused and this is called model in MVC.if u use single servlet it may become long but u can seperate in 2 or more but not each servlet for each use case.

frank26a at 2007-7-14 18:32:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...