Utility Tools

CHAPTER 13

J2EE Wizards

To speed project development, use the following wizards when creating standard J2EE components and other Java classes:

You access these wizards by selecting File>New>File from the menu.

 
Top of page

EJB Wizard

Use the EJB Wizard to create EJB1.1 entity and session beans or EJB2.0 entity, session, and message beans. The following sections describe:

 
Top of section

About the EJB Wizard

The EJB Wizard can speed your EJB development effort by providing:

Once you have created the EJB using the EJB Wizard, you can modify it in the Java Editor by opening its Java source files from the Project tab of the Navigation Pane.

 
Top of section

Starting the EJB Wizard

Procedure To start the EJB Wizard:

  1. Select File>New>File.

  2. On the General tab, choose EJB (in the Advanced section) and click OK. (Alternatively, you can double-click EJB.)

  3. The steps you follow depend on the type of bean you want to generate; see Panel sequence (below) for details.

 
Top of section

Panel sequence

This section lists the panels you need to complete in the EJB Wizard, depending on the type of bean you want to create. Click the link to display more information about how to complete the panel.

If you want to create

You step through these panels

A stateful or stateless session bean

  1. Specifying the EJB type

  2. Specifying the EJB JAR configuration

  3. Specifying the project, package, and directory

  4. Specifying the EJB source

  5. Specifying the EJB class and interface names

  6. Specifying methods

  7. Specifying additional classes or packages to import

  8. Completing the EJB

A message-driven bean

  1. Specifying the EJB type

  2. Specifying the EJB JAR configuration

  3. Specifying the project, package, and directory

  4. Specifying the EJB source

  5. Specifying the EJB class and interface names

  6. Specifying methods

  7. Specifying additional classes or packages to import

  8. Completing the EJB

A BMP entity bean

  1. Specifying the EJB type

  2. Specifying the EJB JAR configuration

  3. Specifying the project, package, and directory

  4. Specifying the EJB source

    or

  5. Specifying the EJB class and interface names

  6. Specifying persistent (data) fields

  7. Specifying primary key fields

  8. Specifying fields that require get/set methods

  9. Specifying create() methods

  10. Specifying find() methods

  11. Specifying additional classes or packages to import

  12. Specifying resource references

  13. Completing the EJB

A 1.x CMP entity bean

  1. Specifying the EJB type

  2. Specifying the EJB JAR configuration

  3. Specifying the project, package, and directory

  4. Specifying the EJB source

    or

  5. Specifying the EJB class and interface names

  6. Specifying persistent (data) fields

  7. Specifying primary key fields

  8. Specifying fields that require get/set methods

  9. Specifying create() methods

  10. Specifying find() methods

  11. Specifying additional classes or packages to import

  12. Completing the EJB

A 2.x CMP entity bean

  1. Specifying the EJB type

  2. Specifying the EJB JAR configuration

  3. Specifying the project, package, and directory

  4. Specifying the EJB source

    or

  5. Specifying the EJB class and interface names

  6. Specifying persistent (data) fields

  7. Specifying primary key fields

  8. Specifying fields that require get/set methods

  9. Specifying relationships

  10. Specifying create() methods

  11. Specifying find() methods

  12. Specifying additional classes or packages to import

  13. Completing the EJB

 
Top of section

Panel reference

This section describes the options on each panel of the EJB Wizard. The panels are:

Specifying the EJB type

This panel lets you specify the type of EJB you want to create.

EJBWizardtype

Procedure To complete this panel:

  1. Specify the EJB type:

    Option

    What to do

    Entity EJB, container-managed persistence Version 1.x

    Select this option when you want the EJB Wizard to create an entity bean that uses container-managed persistence (CMP) defined by the EJB1.1 specification

    Entity EJB, container-managed persistence Version 2.x

    Select this option when you want the EJB Wizard to create an entity bean that uses container-managed persistence (CMP) defined by the EJB2.0 specification

    Entity EJB, bean-managed persistence

    Select this option when you want the EJB Wizard to create an entity bean that uses bean-managed persistence (BMP)

    Session EJB, stateless

    Select this option when you want the EJB Wizard to create a stateless session bean

    A stateless session bean is released to the instance pool after each method call completes, so it is not guaranteed that a client will have the same instance on subsequent method calls

    Session EJB, stateful

    Select this option when you want the EJB Wizard to create a stateful session bean

    A stateful session bean is bound to the client session that creates it, so it can be used to maintain values associated with that client session

    Message-driven EJB

    Select this option when you want the EJB Wizard to create a message-driven bean

  2. Click Next to continue.

Return to Panel sequence.

Specifying the EJB JAR configuration

This panel lets you specify whether the wizard should create one EJB JAR or an EJB JAR and an EJB-client JAR.

EJBWizardJARConfig

Procedure To complete this panel:

  1. Specify the EJB JAR configuration:

    Option

    What to do

    Create separate EJB-client & EJB JARs

    Select this option if you want the wizard to use these two JARs:

    • EJB JAR—Contains the bean implementation classes, any utility classes that are private to the implementation, and a deployment descriptor in the META-INF directory.

    • EJB-client JAR—Contains the EJB home and remote interfaces, a primary key class, and any utility classes that a client might require to use the EJB. The EJB-client JAR is a plain archive file; it does not contain a deployment descriptor. If you have EJBs that are used by other EJBs in the EJB JAR (like helper EJBs) but are not used by clients, then do not put the home and remote interfaces of the helper EJBs in the EJB-client JAR.

    Create a single JAR for all EJB classes

    Select this option if you want the wizard to use a single EJB JAR that will contain all of the EJB classes and interfaces.

  2. Click Next to continue.

Return to Panel sequence.

How EJB JARs and EJB-client JARs are related in a project   An EJB-client JAR project is a peer to its EJB JAR project—it is not a subproject of the EJB JAR project. The EJB JAR and EJB-client JAR are linked in the following ways:

If you create an EJB JAR as a subproject, its EJB-client JAR will also be made a subproject of the same parent project. The EJB-client JAR will have the same project location, same archive location, same subproject status, and same inclusion in its parent archive as the EJB JAR.

Specifying the project, package, and directory

This panel is used to specify details about the project location (project, directory, package) where the wizard is to store the EJB files it generates.

If you chose to use both an EJB JAR and an EJB-client JAR, you are prompted to provide the project/package/directory information for the EJB-client JAR on a panel similar to this one:

EJBWizardprojpackdir

Procedure To complete this panel:

  1. On the top portion of this panel of the EJB Wizard, specify one of the following three project association options:

    Option

    What to do

    Add to open EJB JAR project

    If you currently have one or more EJB projects open, you can add the EJB to one of those projects by selecting it from the dropdown list. If the project that you want to associate the EJB with is not currently open, you must open the target project before starting up the EJB wizard.

    If the EJB project is defined as an EJB1.1 project, you cannot add EJBs that use EJB2.0 features—and the wizard prevents you from doing so.

    Create project

    Click Create project to start the New Project Wizard.

    When you create a new EJB project, you are prompted to specify whether it is an EJB1.1 or EJB2.0 project. You can add EJB1.1 beans to an EJB2.0 project, but not vice versa.

    For more information    For details, see Creating projects and subprojects.

    No project -- just write files to the disk

    If you do not want to associate the EJB with a project, you can still use the wizard to create the class in a nonproject directory on the file system.

  2. On the bottom portion of this panel of the EJB Wizard, specify the following:

    Option

    What to do

    Base directory

    If you specified an EJB project, the default base directory is the project directory. Otherwise, this field is empty. (Click Browse to specify a file system location.)

    Package

    Specify the EJB's package name. This is required.

    File directory

    The contents of Base directory and Package are combined to specify the location of the EJB source file, which is displayed under the File directory.

    This is the file system location where the wizard creates the bean source file and home and remote interfaces.

  3. Click Next to continue.

Return to Panel sequence.

Specifying the EJB source

This panel is used to identify whether the EJB source that the wizard generates should be completely new, based on an existing source file, or (for entity beans) a database table.

EJBWizardSource

Procedure To complete this panel:

  1. Choose one of the following options:

    Option

    What to do

    Create EJB from scratch

    Select this option if you want to create a new EJB

    Create EJB from database

    Select this option to create an entity bean whose fields are based on the fields in a specific database table

    Create EJB from an existing Java class or interface

    Select this option to use the properties of an existing EJB class or interface as the starting point for your EJB

  2. Click Next to continue.

Return to Panel sequence.

Specifying the source database

This panel is used to specify the information that the wizard needs to connect to a database. Once connected to the database, it is able to get the list of database tables so that you can pick the database table on which the entity bean should be based.

EJBWizardFromTable

Procedure To complete this panel:

  1. Specify:

    Option

    What to do

    Database

    Select a database profile from the dropdown list box. If the dropdown is not populated or if the existing profiles are unsuitable, you must create a database profile by clicking New (or by leaving the wizard to select Tools>Profiles and click the Databases tab).

    When you complete this panel (by clicking Next), the wizard creates a client connection to the database. This means that the database driver (specified in the database profile) must be available to the exteNd Director development environment.

    For more information    For more information on database profiles and driver setup requirements, see Database profile.

    Database username and Database password

    Type a user name and password that you can use to connect directly to the specified database. This user name and password combination must allow access to the database's system tables so that the wizard can access the database's metadata.

  2. Click Next to continue.

Return to Panel sequence.

Selecting a database table

This panel presents a list of database tables. You can select the database table that you want to use as the basis for your entity bean.

EJBWizardChooseTable

Procedure To complete this panel:

  1. Specify the following two options:

    Option

    What to do

    Catalog/Creator/Schema

    Select the Catalog/Creator/Schema containing the database table you want to use for the entity bean

    Table

    Select the database table that contains the fields you want to include in the entity bean

  2. Click Next to continue.

Return to Panel sequence.

Specifying the source class or interface

This panel lets you choose an existing Java class or interface that the wizard should use as the basis for your EJB.

EJBWizardFromExistingFile

Procedure To complete this panel:

  1. Specify:

    Option

    What to do

    Existing file

    Click Browse to locate the remote interface or EJB class that you want to use as the starting point for your EJB

    The file you specify can only be a class file for a bean implementation or remote interface

  2. Click Next to continue.

Return to Panel sequence.

Specifying the EJB class and interface names

This panel lets you specify a name for the EJB classes and interfaces that the wizard generates.

How the wizard names EJBs   The EJB Wizard generates names for the EJB's implementation classes and interfaces based on a Base name that you supply in this wizard panel. It follows these rules when naming the EJB components:

EJB component

Naming conventions

Example

Bean class

Prepends EB, SB, or MB and appends Bean to the base name

SBCalculatorBean

Remote interface

Prepends EB or SB to the base name

SBCalculator

Home interface

Prepends EB or SB and appends Home to the base name

SBCalculatorHome

Local interface

(EJB2.x only)

Prepends EB or SB and appends Local to the base name

SBCalculatorLocal

Local home interface

(EJB2.x only)

Prepends EB or SB and appends LocalHome to the base name

SBCalculatorLocalHome

Primary key classes

(entity beans only)

Prepends EB and appends PK to the base name

EBCustomerPK

EJBWizardNames

Procedure To complete this panel:

  1. On the top portion of this panel of the EJB Wizard, specify values for the following components:

    Option

    What to do

    Base name

    Specify a legal name for the EJB class and interfaces. This name is used to construct the names for the other EJB components

    If you are creating an entity bean based on a database table, the wizard defaults these names to the database table name as the Base name and then uses the rules defined in How the wizard names EJBs just above

    Logical EJB name

    Accept the default or provide a legal name

    This name is used:

    • For comments in the wizard-generated code

    • As the <ejb-name> element in the deployment descriptor (when used within the scope of an open project)

    Implementation class

    Accept the default or specify a legal Java class name

    Create primary key class

    Check this when you want the EJB Wizard to create a separate primary key class

    Primary key class

    Accept the default or specify a legal Java class name

  2. If you are creating an entity or session bean that uses CMP 2.x, you are prompted to select the radio button (on the bottom portion of this panel) that represents the set of interfaces that you want the wizard to generate.

  3. Accept the default names for the set of interfaces, or specify legal Java names.

  4. Click Next to continue.

Return to Panel sequence.

Specifying methods

This panel lets you specify the methods that the wizard will add to the bean implementation class and the remote and/or local interface. Methods on the remote and/or local interface can be called by the EJB's client.

EJBWizardMethods

Procedure To complete this panel:

  1. On this panel of the EJB Wizard, click Add and specify the details of one method at a time:

    Option

    What to do

    Method name

    Specify a legal method name

    Scope

    This value must be public so that the method will be available to external clients; use the Java Editor to specify any nonpublic methods

    Return type

    Select the method's return type

    Parameters

    Click Add to specify the following values for the parameter:

    • Type—Specify the parameter's data type

    • Name—Specify a legal name for the parameter

    Exceptions

    Click Add to specify the Exceptions that are thrown by this method

    You do not need to add the java.rmi.RemoteException; it is added to the remote interface by default

  2. Click OK to create the methods.

  3. Repeat these steps to create other methods or click Next to continue.

Return to Panel sequence.

Specifying persistent (data) fields

This panel lets you specify the CMP entity bean's persistent fields or the BMP entity bean's data fields. This panel is already populated if you base the bean on a database table. Otherwise, you'll have to use the Add button to add the fields you want.

NOTE:   The EJB2.0 specification requires CMP field names to begin with a lowercase letter. If you base your entity bean on a table with field names that begin with uppercase (like Customer) or are all uppercase (CUSTOMER), the wizard generates lowercase variable names to comply with the specification. The wizard does not modify the names for BMP beans, because the specification does not require it.

EJBWizardPersistentFields

Procedure To complete this panel:

  1. Specify:

    Option

    What to do

    Persistent field

    If the fields that should be managed by the container are listed, make sure the check box in the container-managed column is checked

    Use the Check All/ Uncheck All and Add/Delete buttons to manage the list of container-managed data fields

    Use the Up/Down buttons to move the fields to the appropriate position if the entity bean should have a composite key

    Container-managed fields are listed in the deployment descriptor and can be mapped to a database field at deployment time

    Type

    When adding a new field, provide the Java data type. The data type must be the Java type that corresponds to the field's JDBC type. For a list of the data types, see the javadoc for java.sql.Types.

    Container managed

    Check or uncheck the fields as needed

  2. Click Next to continue.

Return to Panel sequence.

Specifying primary key fields

This panel lets you specify the fields that make up the entity bean's primary key.

EJBWizardPrimaryKey

Procedure To complete this panel:

  1. Specify the following information for each field that is part of a primary key field:

    Option

    What to do

    Field

    Move the cursor to the field

    Primary Key

    Depends on how you responded to the Create primary key checkbox on the wizard panel described in Specifying the EJB class and interface names. If you:

    • Checked the Create primary key class checkbox, you can check one or more fields to be included in the primary key class that the wizard will generate.

      • If you select a single field for the primary key, you must also select the Use this single field... checkbox at the bottom of the wizard panel described below.

    • Did not check the Create primary key class checkbox, you can do either of the following:

      • Select a single field for the primary key. You must also select the Use this single field... checkbox at the bottom of the wizard panel described below.

      • Unselect any primary key fields. The wizard will generate code that uses a primary key class of type java.lang.Object. You will have to specify the primary key class type at deployment.

    Use this single field directly as the primary key

    Check this if you've selected a single field that the wizard should use as the primary key.

    The field must be a String or a wrapper class for a primitive type (such as java.lang.Integer). The wizard generates the code so that the wrapper-class type is in the deployment descriptor's <prim-key-class> element and the primary key field name is in the <primkey-field> element.

  2. Click Next to continue.

Return to Panel sequence.

Specifying fields that require get/set methods

This panel lets you specify the fields for which the wizard should generate accessor (get/set) methods.

EJBWizardAccessorMethods

Procedure To complete this panel:

  1. Specify the following information for each field that requires a get or set method:

    Option

    What to do

    Field

    Move the cursor to the field

    Get method

    Specify whether the wizard should generate (checked) a get method for this data field

    If your entity bean will be doing any kind of read-only or read-write data access on this data field, you should have the wizard generate a get method

    Set method

    Specify whether the wizard should generate (checked) a set method for this data field

    If your entity bean will be doing updates on this data field, you should have the wizard generate a set method

  2. Click Next to continue.

Return to Panel sequence.

Specifying create() methods

This panel lets you specify the create() methods that the wizard should generate.

EJBWizardCreateMethods

Procedure To complete this panel:

  1. Click Add to define a new create() method.

    OR

    Highlight an existing create() method and click Edit.

    The Create Method Detail panel appears.

  2. On the Create Method Detail panel, specify:

    Option

    What to do

    Field

    Move the cursor to the field and check or uncheck the fields that should be included in the create() method generated by the EJB Wizard

    Do not delegate—generate code for this create method

    For bean-managed entity beans only

    Click this radio button if you want the EJB Wizard to generate skeleton code for this create() method using the checked fields

    Delegate to another create method

    For bean-managed entity beans only

    Click this radio button if you do not want the EJB wizard to generate skeleton code for this create() method, then select the method to call instead from the dropdown

  3. Click OK to return to the create() methods panel.

  4. Click Next to continue.

Return to Panel sequence.

Specifying relationships

This panel lets you specify values for the <relationships> node in the EJB deployment descriptor. Relationships exist between two entity beans with container-managed persistence. However, when you use the EJB Wizard, you are creating a single bean at a time—so you can only define the <relationship> node entries for the bean you are currently creating. You can define a relationship from the current bean to a preexisting bean or a not-yet-defined bean. For the related bean, you can use the name you know you will be giving it later, or you can use the default name EBUnspecified. When you use EBUnspecified, the wizard generates an incomplete relationship node in the deployment descriptor.

Relationships can be defined as bidirectional or unidirectional.

How to define bidirectional and unidirectional relationships   In a bidirectional relationship, each bean knows about the other bean in the relationship. Each bean has methods for accessing the relationship field of the other bean. The wizard can generate these accessor methods when you define a relationship field for boths sides of the relationship. The relationship field is represented in the wizard as the CMR field name.

In a unidirectional relationship, only one bean in the relationship knows about the other bean. An example of a unidirectional relationship is between a lineitem and a product. The lineitem needs to know about the product, but the product does not know about the lineitem. In a unidirectional relationship, you would define a relationship field (a CMR field name) for the lineitem bean, but not for the product.

Editing bean relationships   The wizard allows you to edit only the relationships listed in the deployment descriptor that are considered incomplete and that:

EJBWizardRelationship

Procedure To complete this panel:

  1. To add a relationship, choose Add.

  2. To edit or delete a relationship, highlight the relationship and choose the button appropriate to the action you want.

The Relationship Detail panel   The wizard requires the following elements to generate accessor methods if this is part of a bidirectional relationship, or if it is unidirectional and is the bean that knows about the other bean:

You can fill in all of the other information later using the Deployment Descriptor Editor.

EJBWizardRelationshipDetail

Procedure To complete this panel:

  1. Specify:

    Option

    What to do

    Relationship name

    Enter a unique name that identifies the relationship you are constructing.

    This corresponds to the <ejb-relation-name> element in the Deployment Descriptor. This element is not required by the Deployment Descriptor or the wizard.

    For each relationship, you must specify two beans.

    Relationship role 1

    Multiplicity

    Enter the cardinality of the relationship from the current bean (the one you are creating) to the related bean; it can be One or Many.

    This corresponds to the <multiplicity> element in the deployment descriptor.

    EJB name

    Enter the bean name. The bean name entered here must always match an <ejb-name> element in the enterprise-beans section of the deployment descriptor.

    The wizard adds this entry to the <ejb-name> element of the <relationship-role-source> element in the deployment descriptor.

    Cascade delete

    Check this if you want the current bean to be deleted when the related bean is deleted.

    This is available only when the related bean's multiplicity is One.

    This corresponds to the <cascade-delete> element of the deployment descriptor.

    CMR field name

    If this bean is in a bidirectional relationship or is in a unidirectional relationship and knows about the related bean, enter a name that begins with a lowercase letter.

    The wizard uses the name to generate methods for accessing the related bean. This corresponds to the <cmr-field-name> element of the cmr-field node in the deployment descriptor.

    Access methods

    If a cmr-field is specified, you must create set and/or get methods. Otherwise, no accessor methods are needed.

    Return/param type

    The return type must be the local interface of the related bean or a java.util.Collection type (depending on the related bean's multiplicity.

    Relationship role 2

    Multiplicity

    Enter the cardinality of the relationship of the related bean to the bean you are creating. It can be One or Many.

    EJB name

    Enter the bean name.

    This should match an <ejb-name> element in the enterprise-beans section of the deployment descriptor (although it may not exist yet).

    Cascade delete

    Check this check box if you want this bean removed when the current bean is removed.

    CMR field name

    If this bean is in a bidirectional relationship or is in a unidirectional relationship and knows about the current bean, enter a name that begins with a lowercase letter.

    The wizard uses the name to generate methods for accessing the related bean. This corresponds to the <cmr-field-name> element of the cmr-field node in the deployment descriptor.

  2. Click OK to return to the relationship panel.

  3. Click Next to continue.

Return to Panel sequence.

Specifying find() methods

This panel lets you define the bean's finder methods.

EJBWizardFindMethods

Procedure To complete this panel:

  1. On this panel of the EJB Wizard, click Add to define a new find() method.

    OR

    Highlight an existing find() method and click Edit.

    The Find Method Detail panel appears.

  2. On the Find Method Detail panel, specify:

    Option

    What to do

    Method name

    Specify a legal Java method name

    Returns

    Click the radio button associated with the Java type that is returned

    Method parameters

    Click Add to enable the Type and Name text boxes and then:

    • Specify the Java data type of the parameter.

    • Specify a legal Java parameter name.

  3. Click OK to return to the find() methods panel.

  4. Click Next to continue.

Return to Panel sequence.

Specifying additional classes or packages to import

This panel is used to specify any other classes or packages you want the wizard to generate import statements for. The wizard does not import any packages by default.

EJBWizardImports

Procedure To complete this panel:

  1. Click Add to specify classes or packages to import.

  2. Type the fully qualified path name of the Java class or the full package name in the text field.

  3. When you are done adding or removing additional classes or packages, click Next to continue.

Return to Panel sequence.

Specifying resource references

This panel lets you specify the resource reference that you'll use as a substitute for the database table name in the bean's source code, the connection factory class, and the type of authentication.

EJBWizardBMP

Procedure To complete this panel:

  1. Specify:

    Option

    What to do

    Database resource reference name

    Specify the name that will be put in the JNDI environment and looked up by anyone trying to get the named resource

    The EJB specification recommends that this be prefaced with jdbc/—for example:

      jdbc/MyDataSource
    

    The deployer will later map this reference to the appropriate database

    Connection factory class

    Specify the Java type of the factory (not of the resource)

    Database authentication

    Specify who performs the login to the resource:

    • Specifying container means the container signs onto the resource manager in order to obtain the resource factory

    • Specifying application means the code in the EJB signs onto the resource manager programmatically

  2. Click Next to continue.

Return to Panel sequence.

Completing the EJB

This panel shows all of the classes and interfaces that the wizard will generate. Review it carefully to make sure that you have specified everything you wanted to. If you find a mistake, you can click the Back button to return to a panel and make the appropriate change.

EJBWizardCompleted

Procedure To complete the EJB:

  1. Check the values in the Summary panel to make sure you have specified everything correctly, and then click Finish.

  2. When the Summary panel reports the wizard is done creating the EJB, click OK.

    Now the EJB implementation class and the interfaces are open for editing in the Java Editor.

Return to Panel sequence.

 
Top of page

JSP Wizard

Use the JSP Wizard to create JSP pages. The following sections describe:

 
Top of section

About the JSP Wizard

Use the JSP Wizard to quickly specify a variety of attributes for your JSP page and add your JSP page to an open project.

 
Top of section

Starting the JSP Wizard

Procedure To start the JSP Wizard:

  1. Select File>New>File.

  2. On the General tab, choose JSP and click OK. (Alternatively, you can double-click JSP.)

  3. Continue as described in Specifying the JSP page name and other options (below).

 
Top of section

Specifying the JSP page name and other options

Procedure To specify the JSP page name and other options:

  1. On the first panel of the JSP Wizard, specify the following options:

    Option

    What to do

    JSP name

    Specify the name for the JSP page. You don't need to specify the .JSP extension.

    Page title

    Specify the text for the JSP page's title.

    Generated as <title>text</title>.

    Content type

    Specify the MIME-type of the response generated by the JSP page. Choose from the list provided.

    The default is HTML.

    Generated as the contentType attribute of the page directive.

    Template

    Specify a code-generation template if you want to use one other than the default. Depending on your exteNd product configuration, you may have a choice of templates (which tailor class generation for different needs).

    Use session

    Specify whether the JSP page participates in session management (in other words, is part of a session).

    Generated as the session attribute of the page directive.

    Thread safe

    Specify whether the JSP page, once compiled into a servlet, can respond to multiple simultaneous requests. If not, deselect the check box.

    Generated as the isThreadSafe attribute of the page directive.

    Form-based page

    Specify whether a simple HTML form is generated on the JSP page (enabled only if you are generating an HTML or XHTML page).

    Create error page

    Specify whether an error page is generated for this JSP page (enabled only if you are generating an HTML or XHTML page). The error page is displayed if an uncaught error occurs when the server is processing the JSP page.

    Generated as the errorPage attribute of the page directive.

    Specify import values

    Specify whether you want to specify Java classes and packages to import so that you can reference classes in the JSP page without having to explicitly specify package names. If you select this option, you will see an additional panel in the wizard where you can specify the classes and packages.

  2. Click Next to proceed to the next wizard panel. See Specifying the project, directory, and package.

 
Top of section

Specifying the project, directory, and package

Procedure To specify the project, directory, and package:

  1. On this panel of the JSP Wizard, specify the following options:

    Option

    What to do

    Add to open WAR project

    If you currently have one or more Web archive (WAR) projects open, you can add the JSP page to one of those projects by selecting it from the list.

    Create project

    If you do not have a WAR project open but want to associate the JSP page with a WAR project, click Create project to start the New Project Wizard.

    For more information    See Creating projects and subprojects for details.

    No project—just write files to the disk

    Choose this option if you do not want to associate the JSP page with a project; the wizard will create the JSP page in a nonproject directory on the file system.

    Base directory

    If you specified a WAR project, the default base directory is the jsps subdirectory of the project directory. Otherwise, this field is empty.

    Click Browse to specify a file system location.

    You can add one or more subdirectories to the default base directory.

    Package

    Specify a package hierarchy (with levels separated by periods) to place the JSP page in a subdirectory of the base directory.

    This affects only the directory where the JSP page is saved and the default URL for accessing the JSP page. The JSP page itself is unaffected.

    For example, if the base directory is ProjectDir/jsps and you specified com.myco as the package, the JSP page will be created in ProjectDir/jsps/com/myco.

    File directory

    The contents of Base directory and Package are combined to specify the location of the JSP page, which is displayed under File directory.

    This is the file system location where the wizard creates the JSP page.

    You cannot change the contents of this field directly; you must change Base directory and/or Package.

    Add the files to the root of the archive

    When generating the project archive, place the JSP page at the root of the archive (taking into account any package structure you specified).

    Add the files to the archive with this prefix

    When generating the project archive, place the JSP pages in a directory tree as specified in the prefix (taking into account any package structure you specified).

    The files will be added to this location in the archive

    The location in the archive of the JSP page, as specified by the two preceding selections, is reflected in this field.

    You cannot change the contents of this field directly; you must change the preceding two selections.

  2. If on the first panel you specified that you want to specify import values, click Next to proceed to the next panel. See Specifying imports.

    Otherwise, you are done. Click Finish. When the final wizard panel reports that it has finished creating the JSP page, click OK. See What happens.

 
Top of section

Specifying imports

Procedure To specify classes and packages to import:

  1. On this panel of the JSP Wizard, specify which classes you want to reference in the JSP page without having to specify their package names.

    Classes or packages you specify here are generated as the import attribute of the page directive. This directive corresponds to import statements in a Java source file.

    NOTE:   As a convenience, every JSP page automatically imports all the classes from these packages: java.lang, javax.servlet, javax.servlet.http, and javax.servlet.jsp.

    To add a class or package, click Add and specify the class or package. You can add as many classes or packages as you want.

  2. Click Finish. When the final wizard panel reports it has finished creating the JSP page, click OK. See What happens.

 
Top of section

What happens

The JSP page is generated and appears in the JSP Editor. If you specified that you wanted an error page associated with the JSP page, the error page is generated in the same directory with the name JSPPageNameErrorPage.jsp and is specified in the JSP page's errorPage attribute of the page directive.

The wizard adds the JSP page (and error page if present) to the open project if you selected that option.

 
Top of page

Servlet Wizard

Use the Servlet Wizard to create servlet Java class files. The following sections describe:

 
Top of section

About the Servlet Wizard

The Servlet Wizard provides an automated mechanism for creating Java servlet source files. The wizard provides options to specify these attributes of a Java servlet class:

Once you have created a servlet using the Servlet Wizard, you can modify that servlet in the Java Editor.

 
Top of section

Starting the Servlet Wizard

Procedure To start the Servlet Wizard:

  1. Select File>New>File.

  2. On the General tab, choose Servlet and click OK. (Alternatively, you can double-click Servlet.)

  3. Continue as described in Specifying the class name and other servlet options (below).

 
Top of section

Specifying the class name and other servlet options

Procedure To specify the class name and other servlet options:

  1. On the first panel of the Servlet Wizard, specify the following options:

    Option

    What to do

    Class name

    Specify an appropriate name for the servlet class.

    Content type

    Specify the type of the document content of the HTTP response the servlet is to generate.

    The default is HTML.

    Template

    Specify a code-generation template if you want to use one other than the default. Depending on your exteNd product configuration, you may have a choice of templates (which tailor class generation for different needs).

    Implement SingleThreadModel

    Specify whether the servlet class is to implement the SingleThreadModel interface.

    Implementing this interface guarantees that no more than one request thread accesses a single instance of your servlet. While this can guarantee that servlet fields are accessed by only one thread at a time, there can be significant performance costs if your servlet is accessed frequently.

    The default is to allow multithreaded access to the servlet.

  2. Click Next to go to the next wizard panel. See Specifying the project, directory, and package.

 
Top of section

Specifying the project, directory, and package

Procedure To specify the project, directory, and package:

  1. On the second panel of the Servlet Wizard, specify the following options:

    Option

    What to do

    Add to open WAR project

    If you currently have one or more Web archive (WAR) projects open, you can add the servlet to one of those projects by selecting it from the list.

    Create project

    If you do not have a WAR project open but want to associate the servlet with a WAR project, you can click Create project to start the New Project Wizard.

    For more information    For details, see Creating projects and subprojects.

    No project—just write files to the disk

    If you do not want to associate the servlet with a project, you can still use the wizard to create a servlet class anywhere on the file system.

    Base directory

    If you specified a WAR project, the default base directory is a src subdirectory located directly under the project directory. Otherwise, this field is empty.

    Click Browse to specify a file system location.

    You can add one or more subdirectories to the default base directory.

    Package

    If your servlet is to be a member of a package (for example, com.mwbi.welcome), specify the package name in this field.

    File directory

    The contents of Base directory and Package are combined to specify the location of the servlet source file, which is displayed under File directory.

    This is the file system location where the wizard creates the servlet source file.

    You cannot change the contents of this field directly; you must change Base directory and/or Package.

    Add the files to the root of the archive

    When generating the project archive, place the generated class files for the servlet at the root of the archive.

    Add the files to the archive with this prefix

    When generating the project archive, place the generated class files for the servlet in a directory tree as specified in the prefix.

    The default is to place the servlet classes in a WEB-INF/classes directory under the root of the archive.

    If you specified a package name, the directory structure associated with that package is added to the prefix to determine the final archive path for the generated classes.

    The files will be added to this location in the archive

    The location in the archive of the generated servlet class files, as specified by the two preceding selections, is reflected in this field.

    You cannot change the contents of this field directly; you must change the preceding two selections.

  2. Click Next to go to the next wizard panel. See Specifying which HttpServlet methods to override.

 
Top of section

Specifying which HttpServlet methods to override

Procedure To specify which HttpServlet methods you want to override:

  1. On this panel of the Servlet Wizard, specify which methods in the HttpServlet class to override in the servlet.

    Typically, you want to override the doGet and doPost methods. This panel enables you to override these HttpServlet methods:

    Choosing any of these methods causes the wizard to insert the basic structure for that method into the servlet code it generates so that you can easily add the appropriate processing logic later using the Java Editor.

  2. Click Next to go to the next wizard panel. See Specifying which interfaces to implement.

 
Top of section

Specifying which interfaces to implement

Procedure To specify which interfaces to implement:

  1. On this panel, specify any interfaces that the servlet will implement. Click Add to specify an interface. You must specify the fully qualified name of the interface. For each interface, you can specify whether you want the wizard to generate stub methods.

  2. You can rearrange the list of interfaces by clicking Up or Down. You can specify that you want stub methods for all or none of the interfaces by clicking Check All or Uncheck All.

    The wizard will generate the following for each interface you specify:

  3. Click Next to go to the next wizard panel. See Specifying which classes and packages to import.

 
Top of section

Specifying which classes and packages to import

Procedure To specify which classes and packages to import:

  1. On this panel, specify any additional classes or packages that the servlet should import.

    The wizard will generate an import statement for each entry you make here.

  2. Once you have specified the imports, click Finish.

    The Servlet Wizard creates a Java servlet class based on what you specified.

  3. When the wizard reports that it is done creating the servlet, click OK.

    The servlet code appears in the Java Editor.

    If you specified that the servlet is to be associated with a WAR project, the wizard adds the servlet to that project.

 
Top of page

Java Class Wizard

Use the Java Class Wizard to create general-purpose Java class files. The following sections describe:

 
Top of section

About the Java Class Wizard

With the Java Class Wizard you specify a variety of class attributes such as scope and whether to create a class or an interface. The wizard lets you add the new source file to an existing project, create a new project to add the new source file to, or simply write the new class file to disk.

 
Top of section

Starting the Java Class Wizard

Procedure To start the Java Class Wizard:

  1. Select File>New>File.

  2. On the General tab, choose Java file and click OK. (Alternatively, you can double-click Java file.)

  3. Continue as described in Specifying the class name and other options (below).

 
Top of section

Specifying the class name and other options

Procedure To specify the class name and other options:

  1. On the first panel of the Java Class Wizard, specify the following options:

    Option

    What to do

    Class name

    Specify an appropriate name for the Java class.

    Base class

    Specify the base class, if any. You can enter a simple or a fully qualified name.

    Create class or interface?

    Specify whether to create a class or an interface.

    Template

    Specify a code-generation template if you want to use one other than the default. Depending on your exteNd product configuration, you may have a choice of templates (which tailor class generation for different needs).

    Bottom group (check boxes)

    Use any of the following check boxes to further specify class attributes:

    • Public scope

    • Create a default constructor

    • Create main() method

    • Serializable

  2. Click Next to go to the next wizard panel. See Specifying which interfaces to implement.

 
Top of section

Specifying which interfaces to implement

Procedure To specify which interfaces to implement:

  1. On this panel, specify any interfaces that the class will implement. Click Add to specify an interface. You must specify the fully qualified name of the interface. For each interface, you can specify whether you want the wizard to generate stub methods.

  2. You can rearrange the list of interfaces by clicking Up or Down. You can specify that you want stub methods for all or none of the interfaces by clicking Check All or Uncheck All.

    The wizard will generate the following for each interface you specify:

  3. Click Next to go to the next wizard panel. See Specifying which classes and packages to import.

 
Top of section

Specifying which classes and packages to import

Procedure To specify which classes and packages to import:

  1. On this panel, specify any additional classes or packages that the class should import.

    The wizard will generate an import statement for each entry you make here.

  2. Click Next to go to the next wizard panel. See Specifying the project, directory, and package.

 
Top of section

Specifying the project, directory, and package

Procedure To specify the project, directory, and package:

  1. On the top portion of this panel of the Java Class Wizard, specify one of the following three project association options:

    Option

    What to do

    Add to open project

    If you currently have one or more projects open, you can add the class file to one of those projects by selecting it from the list.

    Create project

    If you do not have a project open but want to associate the class file with a project, click Create project to start the New Project Wizard.

    When you are through, the new project is selected as the project to add the new class file to.

    For more information    For more information, see Project design considerations.

    No project—just write the files to the disk

    Choose this option if you do not want to associate the class file with a project; the wizard will create the class file in a nonproject directory on the file system.

  2. On the lower portion of this Java Class Wizard panel, specify the following options:

    Option

    What to do

    Base directory

    If you specified a project, the default base directory is a src subdirectory located directly under the project directory. Otherwise, this field is empty.

    Click Browse to specify a file system location.

    The Base directory is the project root combined with whatever other directories are in the project directory structure above the package path.

    Package

    Specify the fully-qualified Java package name for the new class. You can specify a package hierarchy with levels separated by periods.

    The Java class you are creating is saved in the Base directory combined with the Package directory.

    For example, if the base directory is ProjectDir/classes and you specified com.myco as the package, the class will be created in ProjectDir/classes/com/myco.

    File directory

    The contents of Base directory and Package are combined to specify the location of the Java class source file, which is displayed under File directory.

    This is the file system location where the wizard creates the Java class source file.

    You cannot change the contents of this field directly; you must change Base directory and/or Package.

    Add the files to the root of the archive

    Adds the compiled Java class file to the archive root combined with the package path when generating the project archive.

    Add the files to the archive with this prefix

    Adds the compiled Java class file to the specified archive directory combined with the package path when generating the project archive.

    If you specified a package name, the directory structure associated with that package is added to the prefix to determine the final archive path for the generated class.

    The files will be added to this location in the archive

    The location in the archive of the generated Java class file, as specified by the two preceding selections, are reflected in this field.

    You cannot change the contents of this field directly; you must change the preceding two selections.

  3. Click Finish.

  4. When the final wizard panel reports it's done creating the Java class, click OK.

    The code appears in the Java Editor. (The Java class is added to the open project only if you selected that option.)

The wizard creates the Java class source file. After you write the methods that implement the specific functionality for this new class (as well as any import statements), you can add the new class file to a project.

For more information    For more information, see Adding to projects.

 
Top of page

JavaBean Wizard

Use the JavaBean Wizard to create JavaBeans. The following sections describe:

 
Top of section

About the JavaBean Wizard

Use the JavaBean Wizard to quickly create a skeleton for a JavaBean and add it to an open project.

 
Top of section

Starting the JavaBean Wizard

Procedure To start the JavaBean Wizard:

  1. Select File>New>File.

  2. On the General tab, choose JavaBean (in the Advanced section) and click OK. (Alternatively, you can double-click JavaBean.)

  3. Continue as described in Specifying the class name and other options (below).

 
Top of section

Specifying the class name and other options

Procedure To specify the class name and other options:

  1. On the first panel of the JavaBean Wizard, specify the following options:

    Option

    What to do

    Class name

    Specify the name for the JavaBean. You don't need to specify the .Java extension.

    Base class

    If the JavaBean is inherited from a base class, specify the name of the base class. You can specify a simple or fully qualified name.

    Generated as extends class.

    Template

    Specify a code-generation template if you want to use one other than the default. Depending on your exteNd product configuration, you may have a choice of templates (which tailor class generation for different needs).

  2. Click Next to go to the next wizard panel. See Specifying the data fields.

 
Top of section

Specifying the data fields

Procedure To specify the data fields for the JavaBean:

  1. Define each data field by clicking Add and specifying the name and data type.

    The generated Java file will define the fields in the order in which they are listed here. You can reorder the list by selecting a field and clicking Up or Down.

  2. Click Next to go to the next wizard panel. See Specifying which interfaces to implement.

 
Top of section

Specifying which interfaces to implement

Procedure To specify which interfaces to implement:

  1. On this panel, specify any interfaces that the bean will implement. Click Add to specify an interface. You must specify the fully qualified name of the interface. For each interface, you can specify whether you want the wizard to generate stub methods.

  2. You can rearrange the list of interfaces by clicking Up or Down. You can specify that you want stub methods for all or none of the interfaces by clicking Check All or Uncheck All.

    The wizard will generate the following for each interface you specify:

  3. Click Next to go to the next wizard panel. See Specifying which classes and packages to import.

 
Top of section

Specifying which classes and packages to import

Procedure To specify which classes and packages to import:

  1. On this panel, specify any additional classes or packages that the bean should import.

    The wizard will generate an import statement for each entry you make here.

  2. Click Next to go to the next wizard panel. See Specifying the project, directory, and package.

 
Top of section

Specifying the project, directory, and package

Procedure To specify the project, directory, and package:

  1. On the top portion of this panel of the JavaBean Wizard, specify one of the following three project association options:

    Option

    What to do

    Add to open project

    If you currently have one or more projects open, you can add the bean to one of those projects by selecting it from the list.

    Create project

    If you do not have a project open but want to associate the bean with a project, click Create project to start the New Project Wizard.

    When you are through, the new project is selected as the project to add the new bean to.

    For more information    For more information, see Project design considerations.

    No project—just write the files to the disk

    Choose this option if you do not want to associate the bean with a project; the wizard will create the bean in a nonproject directory on the file system.

  2. On the lower portion of this JavaBean Wizard panel, specify the following options:

    Option

    What to do

    Base directory

    If you specified a project, the default base directory is a src subdirectory located directly under the project directory. Otherwise, this field is empty.

    Click Browse to specify a file system location.

    The Base directory is the project root combined with whatever other directories are in the project directory structure above the package path.

    Package

    Specify the fully qualified Java package name for the new bean class. You can specify a package hierarchy with levels separated by periods.

    The bean you are creating is saved in the Base directory combined with the Package directory.

    For example, if the base directory is ProjectDir/classes and you specified com.myco as the package, the bean will be created in ProjectDir/classes/com/myco.

    File directory

    The contents of Base directory and Package are combined to specify the location of the bean, which is displayed under File directory.

    This is the file system location where the wizard creates the bean source file.

    You cannot change the contents of this field directly; you must change Base directory and/or Package.

    Add the files to the root of the archive

    Adds the compiled JavaBean to the archive root combined with the package path when generating the project archive.

    Add the files to the archive with this prefix

    Adds the compiled JavaBean to the specified archive directory combined with the package path when generating the project archive.

    If you specified a package name, the directory structure associated with that package is added to the prefix to determine the final archive path for the generated bean.

    The files will be added to this location in the archive

    The location in the archive of the generated JavaBean, as specified by the two preceding selections, is reflected in this field.

    You cannot change the contents of this field directly; you must change the preceding two selections.

  3. Click Finish.

  4. When the final wizard panel reports it's done creating the JavaBean, click OK.

    The code appears in the Java Editor. (The JavaBean is added to the open project only if you selected that option.)

The wizard creates the skeleton of the JavaBean source file. The skeleton includes an empty constructor, declarations for all the data fields (as m_name), and get and set methods for all the fields.

 
Top of page

Tag Handler Wizard

Use the Tag Handler Wizard to create tag handler classes for custom JSP tags. The following sections describe:

 
Top of section

About the Tag Handler Wizard

The Tag Handler Wizard can speed your JSP development effort by:

You can edit the tag handler class using the Java Editor. You can modify the TLD or the web.xml files using the XML Editor. Both files are on the Project tab of the Navigation Pane.

 
Top of section

Starting the Tag Handler Wizard

An open project is required before you start this wizard.

Procedure To start the Tag Handler Wizard:

  1. Select File>New>File.

  2. On the General tab, choose Tag handler (in the Advanced section) and click OK. (Alternatively, you can double-click Tag handler.)

  3. Continue as described in Specifying the class name and other options (below).

 
Top of section

Specifying the class name and other options

Procedure To specify the class name and other options:

  1. On the first panel of the Tag Handler Wizard, specify the following options:

    Option

    What to do

    Class name

    Specify the name for the tag handler. The name must be a valid Java name. You do not need to specify the .java extension.

    This value is added to the TLD file in the <tagclass> element.

    Tag name

    Specify the name of the custom tag.

    This will appear in the <name> element of the tag definition in the tag library descriptor file (TLD).

    Template

    Specify a code-generation template if you want to use one other than the default. Depending on your exteNd product configuration, you may have a choice of templates (which tailor class generation for different needs).

    Attributes

    Select this check box if the custom tag should support tag element attributes.

    If you select this option, you will see an additional wizard panel where you can specify the details of the attribute(s).

    Scripting Variables

    Select this check box if the custom tag should support scripting variables.

    If you select this option, you will see an additional wizard panel where you can specify the details of the scripting variable(s).

    Body Tag

    Select this check box if the custom tag will use the content of the tag element's body in a JSP page.

    If you select this option, you will see an additional wizard panel where you can specify the details of the body tag(s).

  2. Click Next to go to the next wizard panel. See Specifying the project, directory, and package.

 
Top of section

Specifying the project, directory, and package

Procedure To specify the project, directory, and package:

  1. On the top portion of this panel of the Tag Handler Wizard, specify one of the following three project association options:

    Option

    What to do

    Add to open project

    If you currently have one or more projects open, you can add the class file to one of those projects by selecting it from the list.

    Create project

    If you want to associate the class file with a new project, click Create project to start the New Project Wizard.

    When you are through, the new project is selected as the project to add the new class file to.

    For more information    For more information, see Project design considerations.

    No project—just write the files to the disk

    Disabled—you must associate the tag handler class with a project

  2. On the lower portion of this panel, specify the following options:

    Option

    What to do

    Base directory

    The default base directory is the project's src subdirectory located directly under the project directory.

    Click Browse to specify a file system location.

    The Base directory is the project root combined with whatever other directories are in the project directory structure above the package path.

    Package

    Specify the fully qualified Java package name for the new tag handler class. You can specify a package hierarchy (with levels separated by periods).

    File directory

    This is the file system location where the wizard creates the tag handler source file and the TagExtraInfo class source file, if any.

    The tag handler class you are creating is saved in the Base directory combined with the Package directory.

    For example, if the base directory is ProjectDir/classes and you specified com.myco as the package, the class will be created in ProjectDir/classes/com/myco.

    You cannot change the contents of this field directly; you must change Base directory and/or Package.

    Add the files to the root of the archive

    Adds the compiled tag handler class file to the archive root combined with the package path when generating the project archive.

    Add the files to the archive with this prefix

    Adds the compiled tag handler class file to the specified archive directory combined with the package path when generating the project archive.

    If you specified a package name, the directory structure associated with that package is added to the prefix to determine the final archive path for the generated class.

    The files will be added to this location in the archive

    The location in the archive of the generated tag handler class file, as specified by the two preceding selections, is reflected in this field.

    You cannot change the contents of this field directly; you must change the preceding two selections.

  3. Click Next to proceed to the next wizard panel. See Specifying the tag library descriptor file.

 
Top of section

Specifying the tag library descriptor file

Procedure To specify the tag library descriptor file:

  1. On the top portion of this panel of the Tag Handler Wizard, choose one of the following options:

    Option

    What to do

    Use Existing TLD

    Choose this option when you are adding new custom tags to an existing TLD, then specify the TLD name and disk location.

    Create New TLD

    Choose this option when you are creating a new TLD and specify the remaining fields.

  2. If you chose Create New TLD, complete the following fields:

    Option

    What to do

    Taglib Short Name

    Specify the value to be used in the Tab Library Descriptor <short-name> element.

    Taglib URI

    Specify a URI that is used in the WAR's deployment descriptor. This is not the URI for the TLD file.

    This URI can be used in the JSP taglib directives to refer to this taglib—for example: /mytags.

    TLD file name

    Specify the name of the TLD to create.

    TLD directory

    Specify the directory location where the wizard should create the TLD file.

    Archive location

    Specify the directory location for the TLD within the archive:

    • When deployed inside a JAR file, the TLD must be in the META-INF directory

    • When deployed directly in a WAR file, TLDs are usually placed in the \WEB-INF directory or a separate \WEB-INF\tlds directory

    JSP Version to support

    Choose the radio button that represents the version of the JSP specification that the TLD will support.

    If you are using a WAR project for J2EE 1.2 (servlet2.2 and JSP1.1), you cannot change the wizard's choice of JSP1.1.

  3. Click Next to go to the next wizard panel. What panel displays next depends on whether you checked the attributes, scripting variables, or body tag check boxes on the first wizard panel. Follow the first option that fits:

 
Top of section

Specifying the body type

Procedure To specify the body type:

  1. Specify values for the following options:

    Option

    What to do

    JSP

    Specify this option when you want to use JSP code, HTML tags, plain text, other custom tags, and any other valid Web page content in the body of the custom tag.

    Tag dependent

    Specify this option when you want to use non-JSP code (like SQL) in the body of the custom tag. The tag's body content will be passed directly to the tag handler class without any runtime evaluation.

  2. Click Next to go to the next wizard panel. What panel displays next depends on whether you checked the attributes or scripting variables check boxes on the first wizard panel.

 
Top of section

Specifying tag handler attributes

Procedure To specify the tag handler attributes:

  1. Specify values for the following options:

    Option

    What to do

    Attribute

    Specify the name of the attribute.

    This value corresponds to the <attribute> element's <name> element within the TLD entry for this custom tag.

    Type

    Specify the data type of the attribute. The value must be a nonprimitive type.

    Required

    Specify whether the attribute is required when the custom tag is used. When checked, the attribute is required. Corresponds to the TLD file's <required> element.

    Runtime expression

    Specify whether you can use a JSP scriptlet expression in the JSP page to set the value of the attribute. This corresponds to the TLD file's <rtexprvalue> element.

  2. Click Next to go to the next wizard panel. What panel displays next depends on whether you checked the scripting variables check box on the first wizard panel.

 
Top of section

Specifying tag handler scripting variables

Procedure To specify tag handler scripting variables:

  1. Specify the values for the following options:

    Option

    What to do

    Variable

    Enter the variable's name.

    Type

    Enter the variable's data type.

    New Object

    Specify whether the variable refers to a new or existing object instance.

    Scope

    Specify the availability of the variable. Values can be:

    • NESTED—The variable is available between the start and end tags

    • AT_BEGIN—The variable is available from the start tag until the end of the page

    • AT_END—The variable is available after the end tag until the end of the page

  2. Click Next to go to the next wizard panel. See Specifying TagExtraInfo class.

 
Top of section

Specifying TagExtraInfo class

Procedure To specify whether or not to create a TagExtraInfo class:

  1. Specify values for the following options:

    Option

    What to do

    Do not create TagExtraInfo class

    Choose this option if you do not want the wizard to create a TagExtraInfo class.

    Create TagExtraInfo class

    Choose this option if you want the wizard to create a TagExtraInfo class. This option might be disabled if your tag's configuration requires a TagExtraInfo class.

    (Optional) Choose the appropriate checkbox if you want the wizard to implement either of the following methods:

    • getVariableInfo()

    • isValid()

  2. Click Finish. When the final wizard panel reports it has finished creating the TagExtraInfo class, click OK.

    See What happens.

 
Top of section

What happens

When you click Finish, the wizard:




Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...