Sun ONE logo      Previous      Contents      Index      Next     

Sun ONE Identity Server Customization and API Guide

Appendix C
WAR Files

Sun™ One Identity Server contains a number of web application archive (WAR) files. These packages contain Java™ servlets and JavaServer Pages™ (JSP) pages that add functionality to the application. This chapter explains WAR files in general, their contents in an Identity Server deployment and which files can be modified. It contains the following sections:


Overview

The Java 2 Platform, Enterprise Edition (J2EE) platform (on which Identity Server is built) uses a component model to create full-scale applications. A component is self-contained functional software code assembled with other components into a J2EE application. The J2EE application components (which can be deployed separately on different servers) include:

  1. Client components (including dynamic web pages, applets, and a Web browser) that run on the client machine.
  2. Web components (including servlets and JSP) that run within a web container.
  3. Business components (code that meets the needs of a particular enterprise domain such as banking, retail, or finance) that also run within the web container.
  4. Enterprise infrastructure software that runs on legacy machines.

The web components tier in the Identity Server model can be customized based on each organization’s needs. This appendix concerns itself with this tier.

Web Components

When a web browser executes a J2EE application, it deploys server-side objects called web components. There are two types of web components: Servlets and JavaServer Pages (JSP).

When a J2EE application is called, the JSP and corresponding servlets are constructed by the web browser.

Packaging Web Components

In general, all J2EE components are packaged separately and bundled together into an Enterprise Archive (EAR) file for application deployment. The Web Components, in particular, are packaged in web application archives (WAR). Each WAR contains the servlets and/or JSP, a deployment descriptor, and related resource files.


Note

The WAR is the same format as a JavaARchive (JAR). However, an eXtensisible Markup Language (XML) deployment descriptor file must also be created.


Static HTML files and JSP are stored at the top level of the WAR directory. The top-level directory contains the WEB-INF sub-directory which contains the following:

When modifying the files included in Identity Server WARs, customers are changing web components and thus, customizing their deployment.


Note

Be aware of any loss of the customized data during patch or upgrade.



WARs And Their Contents

Identity Server contains a number of WARs that can be modified to customize an Identity Server deployment. The WARs themselves are located in IdentityServer_base/SUNWam and include:

The following sections detail the files within each WAR that can be modified and those that SHOULD NOT be modified.

console.war

The following sections detail the modifiable and non-modifiable documents contained within console.war. The path names are based on the directory structure discussed in Packaging Web Components.

console.war Modifiable Files

These directories contain files that can be modified.

console.war Non-Modifiable Files

These directories contain files that SHOULD NOT be modified.

password.war

The following sections detail the modifiable and non-modifiable documents contained within password.war. The path names are based on the directory structure discussed in Packaging Web Components.

password.war Modifiable Files

These directories contain files that can be modified.

password.war Non-Modifiable Files

These directories contain files that SHOULD NOT be modified.

services.war

The following sections detail the modifiable and non-modifiable documents contained within services.war. The path names are based on the directory structure discussed in Packaging Web Components.

services.war Modifiable Files

These directories contain files that can be modified.

services.war Non-Modifiable Files

These directories contain files that SHOULD NOT be modified.


Updating Modified WARs

Once a file within a WAR is modified, the WAR itself needs to be updated with the newly modified file. Following is the procedure to update a WAR.

  1. cd IdentityServer_base/SUNWam
  2. This is the directory in which the WARs are kept.

  3. jar -uvf WARfilename.war <path_to_modified_file>
  4. The -uvf option replaces the old file with the newly modified file. For example:

    jar -uvf console.war newfile/index.html

    replaces the index.html file in console.war with the index.html file located in IdentityServer_base/SUNWam/newfile.

  5. rm newfile/index.html
  6. Delete the modified file.


Redeploying Modified WARs

Once updated, the WARs need be redeployed to their web container. The web container provides services such as request dispatching, security, concurrency, and life cycle management. It also gives the web components access to the J2EE APIs. The following procedures are specific to each particular WAR and web container. After redeploying the war files, all related servers need to be restarted.


Note

The BEA WebLogic Server 6.1 and Sun ONE Application Server web containers do not requireWARs to be exploded. They are deployed as WARs.


BEA WebLogic Server 6.1

The following commands are used on BEA WebLogic Server 6.1 to redeploy Identity Server WARs.


Note

amconsole, amserver and ampassword are the default console, server and password deploy URIs, respectively.


To Deploy console.war On WebLogic

java weblogic.deploy -url protocol://server_host:server_port -component amconsole:WL61 _server_name deploy WL61_admin_password amconsole IdentityServer_base/SUNWam/console.war

To Deploy services.war on WebLogic

java weblogic.deploy -url protocol://server_host:server_port -component amserver:WL61 _server_name deploy WL61_admin_password amserver IdentityServer_base/SUNWam/services.war

To Deploy password.war on WebLogic

java weblogic.deploy -url protocol://server_host:server_port -component ampassword:WL61 _server_name deploy WL61_admin_password ampassword IdentityServer_base/SUNWam/password.war


Note

For more complete information on the Java utility weblogic.deploy and its options, see the BEA WebLogic Server 6.1 documentation.


Sun ONE Application Server 7.0

The following commands are used on Sun ONE Application Server 7.0 to redeploy Identity Server WARs.

To Deploy console.war On Sun ONE Application Server

asadmin deploy -u S1AS_administrator -w S1AS_administrator_password -H console_server_host -p S1AS_server_port --type web secure_flag --contextroot console_deploy_uri --name amconsole --instance S1AS_instance IdentityServer_base/SUNWam/console.war

To Deploy services.war On Sun ONE Application Server

asadmin deploy -u S1AS_administrator -w S1AS_administrator_password -H server_host -p S1AS_server_port --type web secure_flag --contextroot server_deploy_uri --name amserver --instance S1AS_instance IdentityServer_base/SUNWam/services.war

To Deploy password.war on Sun ONE Application Server

asadmin deploy -u S1AS_administrator -w S1AS_administrator_password -H console_server_host -p S1AS_administrator_server_port --type web secure_flag --contextroot password_deploy_uri --name ampassword --instance S1AS_instance IdentityServer_base/SUNWam/password.war


Note

For more complete information on the asadmin deploy command and its options, see the Sun ONE Application Server 7.0 Developer’s Guide.


IBM WebSphere Application Server

For detailed instructions on how to deploy WARs in an IBM WebSphere Application Server container, see the documentation at http://www-3.ibm.com/software/webservers/studio/doc/v40/studioguide/en/html/sdsscenario1.html.



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.