Working with Web Applications
See the following sections for information on Web Applications:
Adding a Servlet with Servlet Mapping and Security Constraints
This section describes how to add servlets to your Web Application's deployment descriptor files, and configure them with security roles, constraints, and assignments.
Adding a Servlet with URL Mapping
Use the following procedure to add a new servlet to the deployment descriptor file:
- Under your Web Application's name in the navigational tree, select Servlets.
- In the Servlets panel, select the servlet and click Add.
- In the General tab, enter the Servlet Name and servlet class or JSP file.
- Optionally, add URL mappings to the servlet in the URL mappings list by entering the URL pattern and clicking Add.
- Click OK.
The servlet's name appears in the Servlet node in the navigational tree.
Adding Security Roles, Constraints, and Assignments
Add security constraints and assignments to security roles using the following procedures.
- Under the Web Application node in the navigational tree, select Security Roles.
- In the editing panel, click Add, enter security role names and descriptions, and click OK.
- Under the Web Application node in the navigational tree, select Security Role Assignments.
- In the editing panel, select a Role and click Add.
- In the edit dialog, add the names of members of the Role.
- Expand the Security Constraints node, and select a role node.
- In the Resources/Pages tab, set the following:
- Web Resource Name
- URL patterns for
- HTTP methods
- allowed and disallowed roles
- Transport Guarantee
- Display Name
- In the Roles tab, set the Roles for which the Resources/Pages settings are allowed.
Adding an ejb-ref/ejb-local-ref and Reference-Description
- In the navigational tree, under the name of your Web Application, open the Servlets directory and select J2EE References.
- In the J2EE References editing panel, select the EJB Refs tab and click Add.
- Use the edit dialog to specify for the EJB the following, and then click OK:
Adding a Resource-Reference
Add a resource-reference to web.xml and then to weblogic.xml using the following procedure.
- In the navigational tree, under the name of your Web Application, open the Servlets directory and select J2EE References.
- In the J2EE editing panel, select the Resource Refs tab and click Add.
- In the edit dialog, select the following:
- In the navigational tree, expand the WebLogic Settings node under Web Applications, select J2EE Links and click Add.
- Select the Resource Reference that you added in step 3, enter its JNDI name for WebLogic, and click OK.
Adding a Listener Class
Add an event listener class to a Web Application using the following procedures:
- In the navigational tree, under the name of your Web Application, select Miscellaneous.
- In the Miscellaneous panel, select Listeners and click Add.
- Enter the classname of the event and click OK.
Adding a Filter with Filter Mapping
- Under the name of your Web Application in the navigational tree, select Filters.
- In the Filters edit panel, click Add.
- In the edit dialog, enter the display settings for the filter:
- Display Name
- Small Icon (must reside within the Web Application)
- Description (optional)
- Large Icon (also must reside within the Web Application)
- Still in the dialog, select the Init Parameters tab and click Add.
- Enter the filter's parameter name and value, and click OK.
Defining a Match Map Class
- Under the name of your Web Application in the navigational tree, select Miscellaneous—>Container Settings.
- Specify an URL match-map class name for this Web Application by entering its name in the URL match-map class name field.
Setting Welcome and Error Pages
Set the welcome and error pages for your Web Application using the following procedures:
- Select your Web Application's name in the navigational tree.
- In the edit panel for the Web Application, select Welcome Files.
- Set the order for existing welcome files using the Move up, Move down buttons, or add new files by entering the filenames and clicking Add.
- Select the Error Pages tab and click Add.
- Enter the filename or browse to the file. Set HTTP Error Code or Exception Type, and click OK.
Adding a Tag Library
Add tag libraries using the following procedure:
- Under your Web Application name in the navigational tree, select Tag Libraries.
- In the Tag Libraries editing panel, click Add.
- Enter the URI for the tag library.
- Enter the location of the TLD or JAR file, or browse to it and select it.
- Click OK.
Adding a Virtual Directory
Add a virtual directory to your Web Application using the following procedures:
- In the navigational tree, under Web Application, WebLogic Settings, select VirtualDirectoryMappings and click Add.
- Set a local directory path by entering it, and add its URL patterns by entering them in the bottom text field and clicking Add. Then click OK.
|
|
|
Copyright © 2002 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
|