The following steps summarize the procedure for creating a Web Application. You may want to use some of the provided developer tools for creating and configuring Web Applications. For more information, see Web Application Developer Tools.
To create a Web Application:
- Arrange the resources (servlets, JSPs, static files, and deployment descriptors) in the prescribed directory format. For more information, see Directory Structure.
- Write the Web Application deployment descriptor (web.xml). In this step you register servlets, define servlet initialization parameters, register JSP tag libraries, define security constraints, and define other Web Application parameters. (Information on the various components of Web Applications is included throughout this document.) Place the descriptor in the WEB-INF directory of the Web Application.
For detailed instructions, see Writing the web.xml Deployment Descriptor.
You can also use the Administration Console to edit Web Application deployment descriptors. For more information, see Web Application Deployment Descriptor Editor Help.
- Create the WebLogic-specific deployment descriptor (weblogic.xml). In this step you define JSP properties, JNDI mappings, security role mappings, and HTTP session parameters. If you do not need to define any attributes in this file, you do not need to create the file.
For detailed instructions on creating the WebLogic-specific deployment descriptor, see Writing the WebLogic-Specific Deployment Descriptor (weblogic.xml).
You can also use the Administration Console to edit Web Application deployment descriptors. For more information, see Web Application Deployment Descriptor Editor Help.
- Archive the files in the above directory structure into war file. Only use archiving when the Web Application is ready for deployment in a production environment. (During development you may find it more convenient to update individual components of your Web Application by developing your application in exploded directory format.) To create a .war archive, use this command line from the root directory containing your Web Application:
jar cv0f myWebApp.war .
This command creates a Web Application archive file called myWebApp.war.
- (Optional). Archive the Web Application into an Enterprise Application.
- Deploy the Web Application on Weblogic Server. This final step configures your Web Application to service requests on WebLogic Server. For detailed instructions, see Deploying Web Applications.
You develop your Web Application within a specified directory structure so that it can be archived and deployed on WebLogic Server, or another J2EE compliant server. All servlets, classes, static files, and other resources belonging to a Web Application are organized under a directory hierarchy. The root of this hierarchy defines the document root of your Web Application. All files under this root directory can be served to the client, except for files under the special directory WEB-INF, located under the root directory. The name of your Web Application is used to resolve requests for components of the Web Application.
Place private files in the WEB-INF directory, under the root directory. All files under WEB-INF are private, and are not served to a client.
No comments:
Post a Comment