Steps for updating the EAR file

Perform the following steps to update the EAR file.

Before you begin

Note: Steps 1 - 11 are the same as for updating the EAR file for Traditional WebSphere Application Server.
You must have the jar command in your path. If you do not, define the JAVA_HOME variable and add the $JAVA_HOME/bin directory to your path. (Installation specific values such as JAVA_HOME are defined as Environment Variables available through the WebSphere administration console.) For example:
export JAVA_HOME=/WebSphere/AppServer/java
export PATH=$JAVA_HOME/bin:$PATH

Procedure

  1. (Optional) Set up a directory to use just for updating the EAR file and make this your working directory. For example:
    cd $HOME
    mkdir pkiear
    cd pkiear

    _______________________________________________________

  2. Copy the EAR file that you are using to the working directory. The default version that is shipped with PKI Services is in the file PKIServ.ear in the directory /usr/lpp/pkiserv/pkijsp. For example:
    cp /usr/lpp/pkiserv/pkijsp/PKIServ.ear .

    _______________________________________________________

  3. Expand the EAR file by using the jar command. For example:
    jar -xvf PKIServ.ear

    _______________________________________________________

  4. Expand the file PKIServ_Web_war:
    jar -xvf PKIServ_Web.war 

    _______________________________________________________

  5. Change to the modifiable include directory:
    cd mod_inc

    _______________________________________________________

  6. The JSP files are in ASCII (ISO8859-1 code page). To edit them on z/OS®, you must convert them to EBCDIC. Use iconv to convert a file to EBCDIC. For example, to convert the file footer.jsp to EBCDIC, enter:
    iconv -f iso8859-1 -t ibm-1047 footer.jsp > $HOME/footer.jsp.edit 

    _______________________________________________________

  7. Use oedit to edit the edit file that you created:
    oedit $HOME/footer.jsp.edit

    _______________________________________________________

  8. Use iconv to convert the edited file back to ASCII. For example:
    iconv -t iso8859-1 -f ibm-1047 $HOME/footer.jsp.edit > footer.jsp 

    _______________________________________________________

  9. Go back to the directory containing the WAR and EAR files, and update the WAR file with the edited and reconverted JSP file:
    cd ..
    jar -uvf PKIServ_Web.war mod_inc/footer.jsp

    _______________________________________________________

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

    _______________________________________________________

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

    _______________________________________________________

  12. Update your server.xml file to point to the location of your modified EAR file.
    <enterpriseApplication id="PKIServ_Web" 
    location="$HOME/pkiear/PKIServ.ear" name="PKIServ_Web">

    _______________________________________________________

Results

When you are done, you updated the JSP files, and updated the EAR file to include the updated JSP files.