What is a better way of writing servlets?
1. By using the first one, you will have lots of if..else..conditions and even the code won't be easily readable!
2. Performance increases by 2nd option as the load on one single servlet is less. [This is not necessarily so, since any servlet is just code being executed in a JVM thread; unless it's synchronized, then you can have as many requests as you want inside a single servlet. -Alex]
4. Easy to mentain the code if it is broken by functionality.
I hope this helps you. --Badri