This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Well, a servlet is just a Java class that happens to implement a particular interface. There's nothing to stop you (other than the potential for confusing a reader, and other issues of general good design) from giving it a "main" method, and/or a constructor, and creating an instance of it in the way you would any other Java object.
Of course, if you create an instance of a servlet class yourself, there will be no container that knows about it, so it will never receive HTTP requests, but I gues that's not what you want, is it?
Well, the one time I used that was when I had a servlet that implemented runnable, with the idea being I could have a thread running and then query it through the web front end - and this servlet was kicked off by a scheduler that I had written - and so it used that bit of code to start it all off - other than that I've never used it for anything
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com