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
- Follow steps 1 to 4.
_______________________________________________________
- Edit the web.xml file. You can use the
following command, or use your preferred editor:
oedit WEB-INF/web.xml
_______________________________________________________
- Copy the lines that begin with the
comment:
<!-- Start: For new application: Application2 -->
and
end with the comment:<!-- End: For new application: Application2 -->
_______________________________________________________
- Change all occurrences of "Application2" in
the copied lines to the name of the application you want to create.
Save the updated file.
_______________________________________________________
- Update the WAR file with the edited template file.
jar -uvf PKIServ_Web.war WEB-INF/web.xml
_______________________________________________________
- Update the EAR file with the updated WAR file:
jar -uvf PKIServ.ear PKIServ_Web.war
_______________________________________________________
- 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