I have a web project (A)develped with struts and hibernate. This project (admin tools) act to config the database for another project tha (B). The problem is that i have to use reflection in project A for retrive a class of project B as follow
If i try this code in a Test class out of the container it works but when i try to use it under Tomcat i have the exception.
I tryed to put project B in buidpath myECLIPSE->project->propetries->java build path->projects->add project B , but the problem persist. Also i noticed that when i deploy my webproject A there are no reference to project B, and project B classes are not in the WEB-INF dir of project A. Is it normal? At least i tried to deploy also project B at the same time but the exception is ever called!
So if someone can help me to discover how i can see a class of another project...
I tryed to put project B in buidpath myECLIPSE->project->propetries->java build path->projects->add project B , but the problem persist.
That just adds classes to the build path of your project so you can compile one project which uses classes contained in another project. Once you have deployed your classes onto your servlet container it's the web app's. classpath that is important. You need to deploy the shared classes to the WEB-INF/classes directory of both web apps.