How can I share common components between Java web applications?

Environment

  • IDE: Netbeans 6.9
  • Application Server: Glassfish 3
  • Frames: Spring, Hibernate, Struts 2

Problem

I have 2 web applications. I want to share resources between them - that is, the jsp form identifier and other assets (js - yui, jquery / images / css). I will add more web applications that will also need access to these common components.

As a last resort, I will create another web project with only shared assets - including them through http: //common.mydomain .

How did someone else achieve this? Can I create a jar / war of web resources and incorporate this into both applications?

I am experimenting, so I am updating the question with any progress.

Many thanks.

+3
3

"" ( ) . ( , NetBeans, IntelliJ IDEA , Eclipse - ).

+1

eclipse , -. .

. JSF 2

+1

Netbeans . . , , , IDE .

IDE ( .)
:

  • maven .
  • .jar
  • (nexus, artifactory) .jar
     ( , mvn install)
  • (), .
+1

Source: https://habr.com/ru/post/1756908/


All Articles