• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to create a shared project/libs use by different web apps

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I use eclipse/tomcat apache to create web apps.
I have webapp1 , webapp2. I found that webapp1 and webapp2 sometimes use the data from the same table. Some DAO objects are overlapped.
I wonder if i can create a common-dao project /lib that can be used by both webapp1,2 and future web apps based on the same database.

how can i create the share projects/libs. or is there any articles online available about this

Thanks
Heng
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can share libraries by adding them to the server classpath. However, i recommend you not do this. It is better to have the libraries deployed with each web application so you can upgrade them independently.
 
heng zhang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You can share libraries by adding them to the server classpath.


do you mean i create a new project called common-dao, then implement Dao objects in this project and add this project to webapp1, webapp2 in the java build path?

It is better to have the libraries deployed with each web application so you can upgrade them independently.


do you mean even the common-dao projects can be shared by different projects, it's still worth implementing those DAOs in separate project, even though they are the pretty much the same?

what do you mean by upgrade? upgrade what?

Thanks
Heng
 
reply
    Bookmark Topic Watch Topic
  • New Topic