Is your goal to be able to give someone a single file that they can place in the deploy directory and then use? If so, package your servlet(s) in a war file. You users can simply copy the war file to the deploy directory and access your servlets.
Thank you very much for your comment!!!!
it is more so they can use it in their project ( like a pre-made login/authentication serlet). WAR is an idea, but it would mean different server context....
IS there a way to use something like....manifest Class-Path or something like that to use jared servlet....or will servlet engine ONLY find servlets in WEB-INF/classes......
It is possible both works:
specify web.xml normally and include servlet in a jar inside:
1) ear/lib (with manifest setting class path to it)
Thank you for help:)
Instead of unzipping the jar and adding the contents to 'WEB-INF/classes' the jar could just be placed in 'WEB-INF/lib' as is.