WebLogic Builder is a visual environment for editing an application's deployment descriptor XML files. You can view descriptor files while you visually edit them in WebLogic Builder, and you won't need to make textual edits to the XML files.
What can I do using WebLogic Builder?
Begin by pointing WebLogic Builder at an application's compiled J2EE components (*.class files or modules that contain *.class files). If any of the deployment descriptor files needed for deployment on WebLogic Server are missing or defective, WebLogic Builder will offer to generate new or newly serviceable descriptor files.
Once deployment descriptor files exist, you can edit their elements and attributes using WebLogic Builder. You can, for example, add a tag library to a web application, or add a finder method to an EJB.
Test your application by using WebLogic Builder to deploy applications to a server.
Recommended Uses for WebLogic Builder
Use WebLogic Builder for the following tasks:
Generate deployment descriptor files for a J2EE module
Edit a module's deployment descriptor files
View deployment descriptor files
Compile and validate deployment descriptor files
Deploy a module to a server
Limitations of WebLogic Builder
WebLogic Builder has some limitations.
Cannot add new modules to an application's descriptor files
Will notice changes to *.class files only if you close and reopen the module
Support for generating descriptors for EJB 1.1 beans is not guaranteed; focus is on EJB 2.0
Validates EJBs only
Cannot automatically display the differences between a changed but unsaved descriptor file and original file
Cannot perform batch descriptor update of XML element values
Cannot remove components from a module's descriptor files
If you make changes to descriptor files while they are opened in WebLogic Builder, Builder will not be aware of the changes
No file management capabilities
Generated XML representations of relations among entity beans are only accurate for one-to-one relations. For entity beans that already have descriptors, Builder does not refresh relations that have a "many" side.
Starting WebLogic Builder
Start Builder from the Start menu or from the command line.
From the Start menu, double-click WebLogic Builder under WebLogic 7.0.
In the command-line, use the following command:
for Windows:
startWLBuilder.cmd
for Unix:
startWLBuilder.sh
This command sets your environment and starts WebLogic Builder.
Open a module (a JAR or an EAR or a WAR or a J2EE module in exploded format) using the File menu's Open options.
When you open a module in WebLogic Builder, you see on the left a navigational tree view of the module's descriptor files, which you use to explore and select the components of the application.
On the right, you see tabbed panels with fields and other controls for editing the deployment descriptor elements of the module.
Use the navigational tree view on the left to select application components, and edit them in the corresponding tabs in the right-hand panel.
Migrate a module with no WebLogic Server deployment descriptors to WebLogic Server by opening the module using the File menu Open Archive or Open Directory.
WebLogic Builder checks that the module has all the deployment descriptor files required for successful deployment on WebLogic Server. If needed deployment descriptor files are missing, WebLogic Builder will offer to generate them for you. If you accept, WebLogic Builder will introspect the class files in your module and create appropriate deployment descriptor files.
WebLogic Builder will not overwrite your existing deployment descriptor files.
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:
EJB Reference Name
Link Name (optional)
EJB Type (Session or Entity)
Remote Interface
Home Interface
Run As (optional)
Description (optional)
WebLogic Builder writes the EJB reference to web.xml. and lists it in the EJB Refs tab of the J2EE References editing panel.
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:
Reference Type
Resource Sharing
Resource Authentication
Add a description and the Reference name, and click OK.
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
Define a match map to specify a class for URL pattern matching for your web application using the following procedure. The url-match-map element written using this procedure is located in weblogic.xml. See url-match-map.
Under the name of your Web Application in the navigational tree, select the Miscellaneous node and then the Container Settings tab.
The Redirect content (determines the value for user-readable data used in a redirect) and Redirect content type (the servlet container uses this value to set the type on the response for internal redirects) fields do not persist values entered in them. Set these values in the text of weblogic.xml.
Check to specify whether redirects will use absolute URLs. If unchecked, the servlet container will not convert the relative url to the absolute URL in the location header in a redirect.
Specify whether to check authentication on forward. If checked, the request dispatcher will check authorization on forwarded requests.
Enter the name of a URL match-map class name for this Web Application.
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.
Working with EJBs
See the following sections for information about EJBs.
Create a relationship between two 2.0 CMP beans using the following procedure.
In the navigational tree under the EJB node, right-click the Relations node and select Add a relation... Note that if your module does not have CMP beans, WebLogic Builder will not display the Relations node.
In the Relations dialog, enter or select a name for the relation.
Set the Between option to One or Many for the first bean, and select the bean.
Set the And option for the second bean to the desired match with the first bean's Between option, and select the second bean and click Next.
In the second Relations dialog, select a Role name, a CMR (Container Managed Relationship) field for the second bean, and a primary key Field for the first bean and a column for the second bean.
Click Next.
In the third Relations dialog, select the role name and optionally set bidirectional relations (CMR field and field type).
Click Finish.
WebLogic Builder writes the relation to ejb-jar.xml, and an entry for the relation appears in the Relations node.
Adding a CMP Field to an Entity Bean
Add a Container Managed Persistence field to an entity bean using the following procedure.
In the navigational tree under EJB, expand an entity bean node and select the CMP Fields node.
In the CMP Fields dialog, select the field's name, which will correspond to a getter on your Bean class. For example, if you have getFirstName() on your Bean class, the name of the CMP field will be firstName.
Use the browse button to browse to a table name. If you are not connected to a server, the browse button will activate the Connect to a Server dialog.
To select the column name, click the browse button and browse the table. Select a column and click OK.
Set the column type.
Click OK.
The new CMP field will appear in the navigational tree under the CMP node of the bean.
Adding a Finder Method to an EJB
To add a finder method to a bean, use the following procedure.
In the navigational tree, under the name of your entity bean, expand the bean and select Finders.
In the bean's Finder editing panel, click Add.
Select the method name, enter its properties, and click OK.
Specifying Optimistic Concurrency
You may want to set optimistic concurrency for your CMP entity beans when parallel transactions seem unlikely to conflict or when speed of response times is more important than certainty that transactions have not conflicted. WebLogic Builder's default setting is pessimistic concurrency. To set optimistic concurrency, do the following.
With an entity bean selected in the left navigational panel, select Tuning -> Cache. In the Concurrency strategy selection field, select Optimistic.
A dialog offers to let you select the Verify column and the Optimistic column to map the entity bean to a table.
Select Version or Timestamp in the Verify column to enable the Optimistic column field.
You can use the Browse button to connect to a server, browse a database, and select a column, or you can type the column name directly.
Adding an ejb-reference Between Two Beans
In the navigation tree, expand an EJB and select Resources.
In the EJB's Resources editing panel, select the EJB Refs or the EJB Local Refs tab and click Add.
To open an archived or an exploded module, from the File menu, select Open. Browse to the archived module or to the directory that contains the exploded module, select it, and click Open.
Troubleshooting
If you try to load a module that is not well formed, for example an EAR that has a nested JAR which is not referenced in the accompanying MANIFEST.MF file, WebLogic Builder may have trouble opening your module.
Connecting to a Server
Connect to a server to deploy your module for testing, or to connect your module to a data source.
From the tools menu, select Connect to Server..
Enter the connect information in the dialog, and click Connect.
Deploying
From the Tools menu, select Deploy Module. If you are not connected to a server, WebLogic Builder offers the Connect dialog.
Selecting a Compiler
From the Tools menu, select Options.
In the Options dialog, select EJBC Compiler.
Click Browse, and browse to the compiler. Select it and click Open.
Closing an Application
From the File menu, select Close.
Saving an Application
From the File menu, select Save.
All changes that you have made to deployment descriptor files in WebLogic Builder will be saved to your module.
Validating an Application
Validating does not save new changes to a module.
Select Validate from the Tools menu to validate your module.
Generating Descriptors
On opening a new module, WebLogic Builder asks you for permission to generate deployment descriptors for your opened module. When you accept, J2EE Application Builder creates the new descriptors and writes them to the appropriate location in the module.
Removing a Component Descriptor
Remove a component from the module by removing its associated descriptor element from the module, outside of WebLogic Builder.
Adding a New Descriptor Element
Add a new descriptor element to the module outside of WebLogic Builder.
Removing a Deployment Descriptor Element
Remove files from module outside of WebLogic Builder.
Viewing Deployment Descriptor XML Files
View the XML files for the actively selected component using the following procedure. Note that these XML views are read-only.
From the View menu, select XML Source.
A tabbed XML viewer appears.
Use the tabs to select the XML file you wish to view.
Deployment Descriptor Elements in WebLogic Builder
The sections listed below show the locations of deployment descriptor elements in WebLogic Builder.
The file tree in the left panel contains nodes that group various deployment descriptor elements together in an intuitive manner. Click these nodes to navigate among the editing panels on the right, where you can make changes to the deployment descriptor elements.