|
Re: Can one make one servlet's code visible/accessible to an other? [message #188914 is a reply to message #188897] |
Thu, 01 March 2007 17:44 |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
You can try creating a J2EE Utility project and putting servlet 2 into
it. You can then have a web project that contains servlet 1 reference
the utility project by using the J2EE Modules Dependencies property page
on the web project. That will setup a structure such that the contents
of the utility project will be jarred up and placed into the web app's
WEB-INF/lib directory at deployment time. This has the affect of putting
both of the servlets in the web app's classloader at runtime. Note that
you will have to manually add a servlet declaration for servlet 2 in web
project's web.xml file and this approach only works for classes. It
doesn't work for re-using jsp files or other web resources.
- Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.03624 seconds