Steps for updating the EAR file

Perform the following steps to update the EAR file

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. (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 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 using the jar command. For example:
    jar -xvf /usr/lpp/pkiserv/pkijsp/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

    _______________________________________________________

Results

When you are done, you updated the JSP files, and updated the EAR file to include the updated JSP files. You can now deploy your updated EAR file to a WebSphere Application Server.