Not sure what you mean by a servlet context. If you are referring to Tomcat's notion of an application Context, then I do not think it matters. You may have classloading issues if you put your jar in the ear. I think in that case you would need to add a manifest 'class-path' element to your war's MANIFEST.MF file.
yes I was talking in terms of Tomcat servlet container.
Any suggestions on this....
I think I already answered your question. AFAIK, if you include your servlets in a jar in WEB-INF/lib then they will be loaded by the War (i.e. the WebAppClassLoader) classloader. If you put your servlets in a jar and put that jar at the ear level, the only way your WebAppClassLoader will use them is if you add a 'Class-Path' entry to your war's MANIFEST.MF file. I am not 100% on the latter as I have never tested it.
The real questions is why you would want to do this. Servlet classes are only relavant in a war. If there are Servlets that you want to share between war's JBoss does that by default (unless your deployment is isolated.)
Please let me know if this solves your problem, or if the later works. Later, cgriffith