-
1. Re: servlet context problem.
j2ee_junkie May 23, 2006 1:08 PM (in response to ayusman)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.
cgriffith -
2. Re: servlet context problem.
ayusman May 26, 2006 4:24 AM (in response to ayusman)Hi Griffith,
yes I was talking in terms of Tomcat servlet container.
Any suggestions on this.... -
3. Re: servlet context problem.
j2ee_junkie May 26, 2006 8:17 AM (in response to ayusman)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