Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: Deployment by Module or Application
- Next: Deploying an EJB JAR Module

## Deploying a WAR Module

You deploy a WAR module as described in Tools for Deployment.

You can precompile JSP files during deployment by checking the appropriate box in the Administration Console or by using the `--precompilejsp` option of the `asadmin deploy` or `asadmin deploydir` command. The sun-appserv-deploy and sun-appserv-jspc Ant tasks also allow you to precompile JSP files.

You can keep the generated source for JSP files by adding the `-keepgenerated` flag to the `jsp-config` element in `sun-web.xml`. If you include this property when you deploy the WAR module, the generated source is kept in domain-dir`/generated/jsp/j2ee-apps/`app-name`/`module-name if it is in an application or domain-dir`/generated/jsp/j2ee-modules/`module-name if it is in an individually deployed web module.

For more information about JSP precompilation, see Options for Compiling JSP Files jsp-config.

HTTP sessions in WAR modules can be saved in a persistent store in case a server instance fails. For more information, see Distributed Sessions and Persistence and the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide.

Note –

After a web application is undeployed, its `HttpSession` information is not immediately removed if sessions are persistent. `HttpSession` information is removed in the subsequent cycle, when timed out sessions are removed. Therefore, you should disable a web application before undeploying it if sessions are persistent.

If you are setting up load balancing, web module context roots must be unique within a cluster. See the Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide for more information about load balancing.

- Previous: Deployment by Module or Application
- Next: Deploying an EJB JAR Module

- © 2010, Oracle Corporation and/or its affiliates