This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Ant related problem

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings:
I have set up build.xml file for A project, and it build the A project successfully. Now I need to include B project into A project. I have B.war. How should I modify build.xml in A project, so it can use resources(such as classes, jsps etc. from B project). By the way, B project has different data structure from A project.
Your help is really appreciated.
Thanks
Nancy
 
Nancy King
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please help me if you can. I really appreciate your help.
Thanks
Nancy
 
Nancy King
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put B.war under lib directory of A project, and add B.war in the classpath property in build.xml of A Project, like following:
<property name = classpath value = "lib\B.war;...">
In jsp file of project A, I tried to use classes from B project <%@ import="com..." %> , just like the way I use classes from A project, but it doesn't work. It seems that Project A can't see Project B.
Please help me if you know how to solve the problem. I really appreciate it. Thanks
Nancy
 
Saloon Keeper
Posts: 21127
131
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It appears that you think that Ant's classpath is somehow related to the classpath that your JSP server is using.
If you need project B to build referencing classes from project A, the project A classes are going to have to be in a jar or class directory tree which is then made part of project B's classpath. Otherwise they won't compile.
However to RUN project B, a copy of the needed Project A classes is going to have to actually reside as a jar in the WEB-INF/lib or WEB-INF/classes directory or else placed in a suitable general-access library as defined by your chosen brand of appserver.
You might also need a project C, if A isn't suitable for wholesale inclusion in project B. You'd put your common classes there.
 
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!