This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How i can see a class of another project..?

 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

thank you!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not an EJB question, but:

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic