Creating a Web site for iSeries Web application development

You can use Web Site Designer to plan and layout the hierarchical design and organization of the HTML and JSP files that you use in your Web application. With Web Site Designer, you can create a Web site consisting of several Web pages that have a consistent theme (layout and style). The layout defines the position of page components; for example, using a page template, you can specify that navigation bars are always at the top of each page in your Web site. A style defines the look of a page using a Cascading Style Sheet (CSS). You can specify a CSS for all of the pages in a Web site from Web Site Designer, and you can also define a CSS in a page template. Once you have your Web site planned and designed, you can use many Web tools, including Page Designer, to create individual Web pages.
Web Site Designer support is a default feature of any Web project that you create. For additional information about Web sites and Web Site Designer, see:

For iSeries Web development tools, you can use Web Site Designer to help you plan and design your iSeries Web applications.

  1. Create a dynamic Web project for iSeries Web development
    1. Click File > New > Project.
    2. Expand Web in the New Project wizard, select Dynamic Web Project, and then click Next to open the New Dynamic Web Project wizard.
    3. In the New Dynamic Web Project wizard:
      1. Enter a name for your project in the Name field and click the Show Advanced button if the advanced settings are not already displayed.
      2. Ensure that the Add module to an EAR project check box is selected.
      3. Check the values for Servlet version and Target server. Note that the list of servers changes depending on the Servlet version selected.
      4. The EAR project is NameEAR. For example, if the project name is myproj, the EAR file name will be myprojEAR. You can change the EAR file name or keep the default.
      5. The Context root must be the same name as the project name, otherwise your results are unpredictable. The context root is the Web application root, the top-level directory of your application when it is deployed to a Web server. The value for this field is updated automatically when you enter the project name.
      6. Select the Add support for annotated Java classes check box if you want to use annotation-based programming tags.
      7. Click Next to go to the Features Page.
      8. Under Web Project features, ensure that Struts, Default style sheet (CSS file), and iSeries Web Components Tag Library are selected.
      9. Click Next to go to the Select a Page Template for the Web Site page.
      10. Click Next to go to the Struts Settings page and ensure that Create a Resource Bundle is selected. If not, select the Override default settings check box and then select Create a Resource Bundle. You can change the resource bundle name if you do not want to use the default name.
      11. Click Finish to create the project.
      12. Select Yes if the Confirm Perspective Switch message appears to open your new project in the Web perspective.
    Web Site Navigation appears under the expanded project in the Project Explorer view. This is a placeholder for the .website-config file that is included in your Web project.
  2. Double click Web Site Navigation to launch Web Site Designer and open website-config in the Navigation view.
    1. Follow the directions for creating a Web site in Adding and deleting a page from a Web site and in the topics listed in its related links.
  3. After you design your Web site, create the JSP files represented by the pages in Navigation view of Web Site Designer. If you created a page template, you can apply your template to the files. You can also create a template for your Web site that you can apply to each to page as you create the page in Web Site Designer. See Editing a Web page from Web Site Designer for information about creating new JSP files. See Designing Web application pages for information about creating a page template.
  4. After you create your JSP files for your Web site, you can use the Web Interaction wizard to create the Web interactions for you Web application. See Creating iSeries Web interactions for information about creating Web interactions.