Import the assembled ear file into WSAD to create the needed WSAD J2EE projects.
In the WSAD, select File > Import > EAR file.
Browse to your previously assembled EAR file.
Specify a Project Name, which will be the name of your Enterprise Application project (such as MyApp_EAR).
Leave the Project location as your default location for this workspace, and click Next.
On the next page, leave the defaults, and click Next.
Specify names for your web project as well as the ATG generated web and EJB projects. It is good practice to use the same format you used for naming the EAR, such as MyApp_WAR or MyApp_EJB. Click Next.
For each web project, update the Java Build settings and add the ATG classes as dependant JARs; since there are references to ATG classes in the
web.xml
of each web project, the projects must know where to find the ATG classes.Select each web project in the list box.
Click the checkbox next to the
atg_bootstrap_ejb.jar
.
Note: You can skip this step and add a reference to these JAR files later.
Remove the references to any folders in the EJB classpath; you will see errors in WSAD if an EJB has a reference to anything except a JAR file. If you need access to classes in the
home/locallib
folder, jar them up and add them to your EAR’s lib directory. You will get a reference to the custom module’s classes later.Select the
atg_bootstrap_ejb.jar
.Uncheck the folder references, typically
lib/_home_slocallib
andlib/_HelloWorld_sclasses
.
Click Finish.
You now have five (if you didn’t choose the Admin UI option when assembling) or six WSAD projects, similar to the following list:
atg_bootstrap_WAR
atg_bootstrap_EJB
atg_admin_WAR
HelloWorld
helloworld_EAR
helloworld_WAR
The projects starting with atg
contain the ATG framework. Helloworld_EAR
is a WSAD Enterprise Application project. HelloWorld
is a Java project, representing your ATG module, and is where your Java development and Nucleus component creation/configuration take place. Helloworld_WAR
is a web project, and is where your JSP development takes place.
You can create Java classes in your web project if they do not need a Nucleus component (for example, a generic servlet), but creating them in your Java project simplifies things.