This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
A servlet class is just the same as any other Java class. As far as the language is concerned, it's not treated any differently.
The difference is what is done to them. A servlet container (e.g. Tomcat) is designed to be able to recognise servlet classes and, if configured correctly, treat them in a particular way. There's nothing magical about this - you can always write your own application that can treat any type of class in a specific way - but there's a standard that all servlet containers follow that means you can write a servlet class and know how it will be used.
Joined: Oct 12, 2012
Thanks a lot Matthew Brown/Seetharaman Venkatasamy.