Home

 

File creation wizards

RAD v7.5 provides many Web development file creation wizards by selecting File Æ New Æ Other and then from Select a wizard, expand the Web folder and select the type of file required. These wizards prompt the user for the key features of the new artifact and can help a user to quickly get a skeleton of the component they require. The artifact created by the wizard can always be manipulated directly if required.

The following wizards are available in the Web perspective:

CSS-The CSS file wizard is used to create a new cascading style sheet (CSS) in a specified folder.

Dynamic Web Project-This wizard steps the user through the creation of a new Web project, including which features the project uses and any page templates present.

Filter-This wizard constructs a skeleton Java class for a Java EE filter, which provides a mechanism for performing processing on a Web request before it reaches a servlet. The wizard also updates the web.xml file with the filter details.

Filter Mapping-This wizard steps the user though the creation of a set of URLs to map a Java EE filter with, The result of this wizard is stored in the deployment descriptor.

HTML-This wizard steps the user though the creation an HTML file in a specified folder, with the option to use HTML Templates.

JSP-This wizard steps the user though the creation an JSP file in a specified folder, with the option to use JSP Templates.

Life-cycle Listener-The Java EE specification allows for classes to be configured to receive pertinent events from the Web container. For example, the classes that implement the HttpSessionListener interface and are declared in the deployment descriptor, receive notification every time an HttpSession is created or destroyed. This wizard guides the user through the creation of such a listener and adds a reference to the deployment descriptor.

Listener-A listener can be used to monitor and react to events in a servlet's life cycle by defining methods that get invoked when life cycle events occur. This wizard guides the user through the creation of such a listener and to select the application life cycle events to listen to.

Security Constraint-This is used to populate the <security-constraint> in the deployment descriptor that contains a set of URLs and a set of http methods, which members of a particular security role are entitled to access.

Security Role-This wizard adds a <security-role> element to the deployment descriptor.

Servlet-This wizard is used to create a skeleton servlet class and add the servlet to the deployment descriptor.

Servlet Mapping-This wizard steps the user through the creation of new URL to servlet mapping and adds it to the deployment descriptor.

Static Web Project-This wizard steps the user through building a new Web project containing only static pages.

Tag-This wizard steps the user through create a new Tag library file.

Web Diagram-It is possible to create a Web Diagram for a Web project that already has a large number of pages. This wizard creates an empty Web Diagram onto which the user can place existing pages and show existing page relationships.

Web Page-The Web Page wizard allows you to create an HTML or JSP file in a specified folder, with the option to create from a large number of page templates.

Web Page Template-The Page Template File wizard is used to create new page template files in a specified folder, with the option to create from a page template or create as a JSP fragment, and define the markup language (HTML, HTML Frameset, Compact HTML, XHTML, XHTML Frameset, and WML 1.3). You can select from one of the following models: Template containing Faces Components, Template containing only HTML, Template containing JSP.

Note: There are also a number of wizards specifically for Struts and JSF, which we discuss in other chapters.

ibm.com/redbooks