Tutorials
WebSphere
WebSphere V5.0 : Web Development - Use Web Page Wizards
WebSphere V5.0 : Web Development - Use Web Page Wizards - Page 2
WebSphere V5.0 : Web Development - Use Web Page Wizards - Page 3The Database Web Pages wizard uses servlet technology to generate Web pages from SQL statements. After providing some general storage and Web page creation parameters, you will select a database model or establish a connection to a database to import a model. Next, you will build a new statement or use an existing statement as a basis for generating Web pages. You can create an input page that collects information to filter the SQL statement, and design the result and detail pages that will format and display the resulting filtered statements to users.

6. Click Next.
7. Choose how to create the SQL statement. If you already have an SQL statement written, from the Select an existing statement saved in your workspace page, you can browse to locate a statement that exists in a workbench project. Click Next.

8. Choose whether to use a data source connection or a driver manager connection in the Runtime Connection Page. A data source connection name should be the JNDI name defined in the server configuration.
A data source is the preferred database connection type for a Web application. A data source is defined in a Web server. Usually, it is a pooled connection, so that the server makes a pool of connections to the database on startup. Each time a JSP file requires a database connection, the server provides one of its pooled connections, which minimizes the connection overhead for the JSP file. When the JSP is done executing, it releases the database connection back to the pool.
For a driver manager connection, the JSP file requires a new connection to the database on each execution. Supply the driver name and associated URL.
Supply the User ID and Password, along with a verification of the password, necessary to access the target database. If this is a new connection, the User ID and Password specified in the Database Connection page are reflected here. If you used an existing database model or an existing SQL statement, these are the values originally used to load the existing database model. The User ID and Password will be added to the web.xml file as an initialization parameter of the servlets associated with the Master View and Details View result pages.

9. Click Next.
10. In the Controller Page, select the check box and use the Browse button to associate a style sheet or error page from the current project with the generated Web pages.
Style Sheets allow you to define colors, fonts and many other attributes of your HTML tagging. The error page enables you specify a URL that is forwarded to a user's browser if an error is encountered while executing one of the generated resources.
11. Select the Request or Session radio button to identify the model type. Storing the results in a session will allow the data to be used in multiple pages for the duration of the session. Storing the results in a request will allow access to the data only for the duration of the request; the result set is destroyed after the request is processed, freeing up memory on the server. The default is Request.
12. Optionally, you can include or remove processing layers from the model used to generate Web pages. A Front Controller is a servlet that serves as the single entry point for all requests to a Web application region. A controller provides a single point to perform all authentication, logging, debugging, and to all subsequent views, including the input, master results, and details results views. You can choose to automatically create a new controller, reuse an existing controller, or not use a controller at all [default]. If you choose not to use a controller, that functional layer of processing is not performed.

13. Click Next.
14. Select and update, as needed, values in the Host variables list and properties table to determine the content, layout, and design attributes of the input form. The scrolling panel on the right side of this page approximates the look and layout of the resulting input page. You can also use the All or None button to select or deselect the entire list. Click the up and down arrow buttons to reorder the columns in the input page.
At least one column must be specified as a Key Value if you chose to generate a Details form.

15. Click Next.
16. Select and update, as needed, values in the Result set columns list and properties table to determine the content, layout, and design attributes of the Master View Web page. The scrolling panel on the right side of this page approximates the look and layout of the resulting page. You can also use the All or None button to select or deselect the entire list. Click the up and down arrow buttons to reorder the columns in the result table.
At least one column must be specified as a Key Value.

17. Click Next.
18. Select and update, as needed, values in the Host variables list and properties table to determine the content, layout, and design attributes of the Details View Web page. The scrolling panel on the right side of this page approximates the look and layout of the resulting page. You can also use the All or None button to select or deselect the entire list. Click the up and down arrow buttons to reorder the columns in the details table.

19. Click Next.
20. Provide a common Prefix for the pages that are generated from the statement. Note that the list of generated pages and resources will reflect any changes to the prefix as you type in the Prefix field.

21. Click Finish to generate the Web pages.
_____________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.
First Page: WebSphere V5.0 : Web Development - Use Web Page Wizards