Exforsys

WebSphere Tutorials

  1. WebSphere V5.0 : Building Expressions
  2. WebSphere V5.0 : Creating SQL statements
  3. WebSphere V5.0 : Applying DDL scripts to a remote database
  4. WebSphere V5.0 : Deploying to the database
  5. WebSphere V5.0 : Defining a table
  6. WebSphere V5.0 : Defining a database
  7. Working with Data in WebSphere
  8. WebSphere V5.0 : Debugging - JSP debugging
  9. WebSphere V5.0 : Debugging - Scrapbook Page
  10. WebSphere V5.0 : Debugging - View variables
  11. WebSphere V5.0 : Debugging - Step-through code
  12. WebSphere V5.0 : Debugging - Set breakpoints
  13. WebSphere V5.0 : Running Applications - Export J2EE applications
  14. WebSphere V5.0 : Running Applications - Run/operate server
  15. WebSphere V5.0 : Running Applications - Understand Session Manager
  16. WebSphere V5.0 : Running Applications - Configure data sources
  17. WebSphere V5.0 : Running Applications - Create server instance and server configuration
  18. WebSphere V5.0 : Web Development - Use Web Page Wizards
  19. WebSphere V5.0 : Web Development - Work with Web Application Deployment Descriptor
  20. WebSphere V5.0 : Web Development - Use content assist
  21. WebSphere V5.0 : Web Development - Use Page Designer to add and modify HTML and JSP content
  22. WebSphere V5.0 : Web Development - Understand classpath and module dependencies
  23. WebSphere V5.0 : Web Development - Create resources in appropriate J2EE locations
  24. WebSphere V5.0 : Web Development - Create a web project
  25. WebSphere V5.0 : Java Development - Use property dialogues
  26. WebSphere V5.0 : Java Development - Use hierarchy view
  27. WebSphere V5.0 : Java Development - Use task view
  28. WebSphere V5.0 : Java Development - Use search function
  29. WebSphere V5.0 : Java Development - Use content assist function and declarations
  30. WebSphere V5.0 : Java Development - Use refactoring features
  31. WebSphere V5.0 : Java Development - Use Outline View and Browsing View
  32. WebSphere V5.0 : Java Development - Create Java project, packages, classes, methods
  33. WebSphere V5.0 : Workbench Basics - Use the Help feature to aid in development activities
  34. WebSphere V5.0 : Workbench Basics - Import to and export from the workbench
  35. WebSphere V5.0 : Workbench Basics - Work with Perspectives
  36. WebSphere V5.0 : Workbench Basics - Set workbench preferences
  37. WebSphere V5.0 : Workbench Basics - Create J2EE projects

Ads


Home arrow Reviews arrow WebSphere Tutorials

WebSphere V5.0 : Web Development - Use Web Page Wizards

Page 1 of 3
Author : Exforsys Inc.     Published on: 16th May 2006    |   Last Updated on: 21st May 2006

WebSphere V5.0 : Web Development - Use Web Page Wizards

In this tutorial you will learn about WebSphere V5.0 : Web Development - Use Web Page Wizards Creating JavaServer Pages (JSP) files, Creating Web pages from Java beans and Creating Web pages from SQL statements.

Ads

Creating JavaServer Pages (JSP) files

You can create and edit a JSP file in Page Designer by adding your own text and images using JavaScript, HTML, or JSP tagging, including Java source code inside of scriptlet tags. You can also create JSP files hat are based on Struts or JavaServer faces architecture.

To create a new JSP file, do the following:

1. To launch the New JSP File wizard, select File > New > JSP File.

2. Select the appropriate container for the file from the list of project folders (and subfolders).

The folder that you choose should be under the Web Content folder of the Web project. If a JSP file is not under this folder, then it will not be included in the WAR file that is deployed to the server. In addition, link validation will not encompass files that are not under the Web content folder.

3. Type a file name into the appropriate field.

4. Ensure that the appropriate option is displayed in the Markup Language drop-down list.

In addition, if you select the Create as JSP Fragment check box, this file will be created as a fragment that can be added to another JSP file. Other JSP files can include JSP fragments using a JSP include directive. Creating a fragment causes the resulting file to end in a .jspf or .jsf extension. You will not be prompted for DOCTYPE information, because a fragment cannot stand alone as a Web page, and it would invalidate any JSP file that included it.

Also, depending which markup language you select, you can select the Use XML Style Syntax option to create a JSP file that adheres to XML style tagging.

5. You have several options for proceeding:

  • If you want to accept the defaults associated with a new JSP file, leave Model as None.
  • If you want to create a JSP file that uses Struts architecture, select Struts JSP in the Model field.


New JSP Wizard

6. Click Finish to create the file, or Next to provide additional information.

7. Optionally add tag libraries from a variety of sources by clicking the Add Tag Library button to locate a TLD file or a JAR file that contains a TLD file. Tag library Universal Resource Identifier (URIs) can be located in one of the following places:

  • Defined in the web.xml file
  • Within a JAR file located in the project lib directory that contains /META-INF/taglib.tld
  • Within a JAR file external to the project
  • In a "loose" TLD anywhere in the project

In the Select a Tag Library dialog, either select one of the available tag libraries, or click the Import button to locate and add a tag library to the list, and then select it. The dialog will automatically populate the informational fields that describe the tag library and its contents. You must specify a Prefix value. Click OK to add the tag library:

Select a tag library

8. As you add tag libraries, the Available Custom Tags window displays the the declaration of the tag along with the tag library directive. If the selected TLD file that hasn't been registered in the web.xml file, it will be added automatically.

Available Custom Tags

9. Click Next to supply page directive information for the JSP file. The imported class and package information are editable. Use the checkboxes to define any additional attributes, including a buffer size, an associated error page, and other modal options.

Page directive information

Ads

10. Click Next to supply encoding, DOCTYPE and style sheet information.

11. Select the appropriate encoding value to add to the JSP's declaration from the Encoding list button. The default is the value set in the JSP Files preferences page, which is accessed by selecting Window > Preferences, and then expanding the Web and XML Files preferences.

12. Ensure that the proper content type is selected in the Content Type drop-down list.

13. Select the HTML Document Type that you wish to associate with the JSP file. Depending on which Document Type that you select using the list button, the corresponding Public ID, and, if appropriate, System ID will be displayed.



 
This tutorial is part of a WebSphere Tutorials tutorial series. Read it from the beginning and learn yourself.

WebSphere Tutorials

  1. WebSphere V5.0 : Building Expressions
  2. WebSphere V5.0 : Creating SQL statements
  3. WebSphere V5.0 : Applying DDL scripts to a remote database
  4. WebSphere V5.0 : Deploying to the database
  5. WebSphere V5.0 : Defining a table
  6. WebSphere V5.0 : Defining a database
  7. Working with Data in WebSphere
  8. WebSphere V5.0 : Debugging - JSP debugging
  9. WebSphere V5.0 : Debugging - Scrapbook Page
  10. WebSphere V5.0 : Debugging - View variables
  11. WebSphere V5.0 : Debugging - Step-through code
  12. WebSphere V5.0 : Debugging - Set breakpoints
  13. WebSphere V5.0 : Running Applications - Export J2EE applications
  14. WebSphere V5.0 : Running Applications - Run/operate server
  15. WebSphere V5.0 : Running Applications - Understand Session Manager
  16. WebSphere V5.0 : Running Applications - Configure data sources
  17. WebSphere V5.0 : Running Applications - Create server instance and server configuration
  18. WebSphere V5.0 : Web Development - Use Web Page Wizards
  19. WebSphere V5.0 : Web Development - Work with Web Application Deployment Descriptor
  20. WebSphere V5.0 : Web Development - Use content assist
  21. WebSphere V5.0 : Web Development - Use Page Designer to add and modify HTML and JSP content
  22. WebSphere V5.0 : Web Development - Understand classpath and module dependencies
  23. WebSphere V5.0 : Web Development - Create resources in appropriate J2EE locations
  24. WebSphere V5.0 : Web Development - Create a web project
  25. WebSphere V5.0 : Java Development - Use property dialogues
  26. WebSphere V5.0 : Java Development - Use hierarchy view
  27. WebSphere V5.0 : Java Development - Use task view
  28. WebSphere V5.0 : Java Development - Use search function
  29. WebSphere V5.0 : Java Development - Use content assist function and declarations
  30. WebSphere V5.0 : Java Development - Use refactoring features
  31. WebSphere V5.0 : Java Development - Use Outline View and Browsing View
  32. WebSphere V5.0 : Java Development - Create Java project, packages, classes, methods
  33. WebSphere V5.0 : Workbench Basics - Use the Help feature to aid in development activities
  34. WebSphere V5.0 : Workbench Basics - Import to and export from the workbench
  35. WebSphere V5.0 : Workbench Basics - Work with Perspectives
  36. WebSphere V5.0 : Workbench Basics - Set workbench preferences
  37. WebSphere V5.0 : Workbench Basics - Create J2EE projects
 

Comments