Linking the banks to the war

I created a project (in netbeans) where all my gui part (the swing used) is in a java-1 application. Data from java application-1 is passed to servlets in WebApplication-1 where the data is stored in the database. The project is working fine.

I was asked to create a jar / war for my project ... so it can be used by anyone where ... I went through the creation of the jar and war (also tested with sample apps). My question is, how can I link java app-1 (jar) to WebApplication-1 (war) ??

Suppose the jar is imported to another system, it should use war (since there are servlets in Webapplication). How can i do this? Is there a way to link the entire project to one library?

+3


source to share


1 answer


You cannot access the war directly from the outside, as according to the Java EE specification, wars should be isolated. Thus, any communication between the GUI and the web application must use other channels, the most obvious of which is HTTP communication such as webservices.



Another option could be to create an ear and put the database code (taking it out of the war) as well as the GUI app and the war.

0


source







All Articles