Steps for creating application domains other than Application2

Perform the following steps to create different application domains when you use JSPs to implement the web application.

Before you begin

You must have the jar command in your path. If you do not, define the JAVA_HOME variable (you can find its value on the WebSphere administration console) and add the $JAVA_HOME/bin directory to your path. For example:
export JAVA_HOME=/WebSphere/V6R1/AppServer/java
export PATH=$JAVA_HOME/bin:$PATH

Procedure

  1. Follow steps 1 to 4.

    _______________________________________________________

  2. Edit the web.xml file. You can use the following command, or use your preferred editor:
    oedit WEB-INF/web.xml 

    _______________________________________________________

  3. Copy the lines that begin with the comment:
    <!-- Start: For new application: Application2 -->
    and end with the comment:
    <!-- End: For new application: Application2 -->

    _______________________________________________________

  4. Change all occurrences of "Application2" in the copied lines to the name of the application you want to create. Save the updated file.

    _______________________________________________________

  5. Update the WAR file with the edited template file.
    jar -uvf PKIServ_Web.war WEB-INF/web.xml

    _______________________________________________________

  6. Update the EAR file with the updated WAR file:
    jar -uvf PKIServ.ear PKIServ_Web.war

    _______________________________________________________

  7. Make sure the PKIServ.ear file is publicly readable by issuing the chmod command.
    chmod 755 PKIServ.ear  

    _______________________________________________________

Results

When you are done, you created another application domain. You can now deploy the updated files following the directions in Deploying the EAR file to a WebSphere Application Server. When you edit the file pkitmpl.xml and add your new application, if its name is "NewApplication" your new application is available at:
http://hostname.com:9080/PKIServ_Web/NewApplication/pkimain.jsp