Saturday, January 28, 2012

Merging ATG Self Service with an Existing J2EE Application


You must combine the ATG Self Service application module and your application module into a single J2EE application with a single context-root. These instructions assume that you are using your own module named DSSJ2EEDemoSS with a J2EE application called QuincyFunds.

1.Make a copy of your application module and rename it. For example, DSSJ2EEDemoSS.

Copy the <ATG9dir>/Service9.4/Service/SelfService/config directory into the <ATG9dir>/DSSJ2EEDemoSS/config/directory. Don’t overwrite any files. If there are files that overlap, copy the contents of the .properties file from ATG Service into your application.

2.Repeat the procedure for the liveconfig directory.

3.Copy over the <ATG9dir>/Service9.4/Service/SelfService/
lib/classes.jar file into your <ATG9dir>/DSSJ2EEDemoSS/lib directory. If you already have a lib/classes.jar, rename the classes.jar from SelfService to ssClasses.jar.

4.In the <ATG9dir>/DSSJ2EEDemo/META-INF/MANIFEST.MF file add the following:

ATG-Class-Path: lib/classes.jar (or lib/ssClasses.jar)

If you already have an ATG-Class-Path declaration, add a space after the last entry in that line, and add lib/classes.jar or lib/ssClasses.jar to it.

Make sure there is an ATG-Config-Path: config/ line and an ATG-LiveConfig-Path: liveconfig line in the file as well.

Add PublishingAgent Service.common-ui to the ATG-Required: line.

5.Make an ss directory in your root web-app folder. For example:

<ATG9dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/en/ss

Copy into this new directory everything from the <ATG9dir>/Service9.4/
Service/SelfService/j2ee-apps/selfservice-ear/_SelfService/ directory.

(This is assuming that you have already followed the directions on how to expand the SS ear file into folders from Accessing the Application.)

6.Except for web.xml, move all the files from the <ATG9dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/en/ss/WEB-INF/* directory into the <ATG9dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/WEB-INF/

Important: Do not overwrite files if they have the same name.

7.Delete the <ATG9dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/en/ss/META-INF directory:

8.Change the <ATG9dir>/DSSJ2EEDemo/j2ee-apps/QuincyFunds/web-app/WEB-INF/web.xml file to add the following filter mappings:

<filter-mapping>
    <filter-name>RequireLoginFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>

You can now include ss into your application using the following:

<dsp:include src="ss/main.jsp"></dsp:include>

No comments:

Popular Posts