Search code examples
jsfweb-applicationsstrutsweblogic

Deploying struts and JSF aplication in a single ear


I have two web applications deployed in two different weblogic servers.

Application 1 is a struts 1.2 based application packaged as EAR.

Application 2 is a JSF application packaged as war(small application compared to App1).

Currently, these two applications are being accessed from two differenr portals.

The idea is to decommission one server and have everything deployed on one server and if possible merge the two applications.

As Application 2 is subset of Application 1, the two aplications need to be merged and deployed on the same server.

I want to know which one of the following will be the best approach :

  1. Deploy the two applications in a single ear with two different war files.
  2. Deploy the two applications as independent ear files on the server.
  3. Merge the App2 in App1 in a single war, by converting the JSF into struts 1.2. Having a filter
    placed to redirect the request to the correct application (as in functionality ) the correct.

Please advice.

Thanks


Solution

  • I think the answer depends a bit on your concrete applications. My suggestion is the following:

    • Approach 3 isn't a good idea in my opinion, because it is a lot of work that actually doesn't bring any real benefit.
    • If the two applications are independent from each other, I would choose approach 2. This should very easy to do and keeps the two application separate from each other.
    • But if the two applications share common source code or functionality, you should consider choosing the first approach. This way you could have two WAR archives that are packaged together with all common code in one large EAR archive.

    I hope this helps. :)