Dependencies for servlet

Adapted for running as a servlet (only tested it with Glassfish4)