Creating Web pages

Show Me

The New Web Page wizard helps you to create HTML, XHTML, frameset, JSP, and JSP fragments.

To create a Web page:

  1. Right click on

    WebContent in the Project Explorer

  2. From the pop-up menu, click on

    New | Web Page. The New Web page wizard appears

  3. Select a template from the Template dialog box, and then type a name for the file. The file extension is added automatically if you do not specify one.

    Warning: If you want to create a JSP page using a user defined template with an .htpl extension, manually enter the .jsp extension in the file name; otherwise, the file will be created as .html page.

  4. Optionally change the folder in which you want to create the new Web page. If you change the folder, make sure you choose one in or under the WebContent folder; this ensures that the file is available for validation, publishing, and deployment.

  5. Check or un-check the Link page to template box. If this box is checked, changes that you make to the template will be reflected in all the Web pages you create that are linked to the template. In most instances, you will probability want to leave this box checked.

  6. To change the options for the Web page template you have selected , click on the Options button. The options that appear will differ based on the type of Web page you are creating.

    Options

    The options that appear when you click the Options button can differ based on the type of Web page you are creating or on the type of facets that are associated with the project.

    For example, if you create a project with the JavaServer Faces (IBM Compatibility) facet enabled, then JavaServer Faces appears in the wizard's Options page. If you enable JavaServer Faces technology, depending on the preferences for the IDE, a Java™ code page can be created in the project, and the JSP will contain some extra tags that support faces components.

    Note: You can select facets when you create a project, or add or remove them after the project is created by right clicking on the project and selecting

    Project | Properties | Project Facets .