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 - Create a web project

Author : Exforsys Inc.     Published on: 21st Apr 2006

WebSphere V5.0 : Web Development - Create a web project

In this tutorial you will learn about Web Development - Create a web project - Creating new static Web projects and Creating new J2EE Web projects.

Ads

Creating new static Web projects

In the workbench, you create and maintain resources for Web applications in Web projects. If you want to create a static, content-based Web application that contains no dynamic files, such as JSP or servlets, use the Create a Web Project wizard to create a new Web static project, as follows:

1. To launch the Web Project wizard in the Web perspective, select File > New > Web Project. Note: From other perspectives, launch the Web Project wizard by selecting File > New > Project. Then select the Web option, Web Project, and then the Next button.

2. Provide a name and storage location for the Web project.

3. Click the Static Web Project radio button.

4. Optionally, select one or more of the Web Project features, such as the Create a default CSS file checkbox, which creates a default CSS file (called Master.css) for any HTML and JSP files included in the project.

Static Web Project

5. Click Next.

6. Provide a Project document root value. A project document root is the default relative path to static Web content from the server root when a static Web project is published. For example, if the project document root is myProject, then the project will be published to http://server_root/myProject. It is used to create the URL that links to Web resources in a static Web project, so Web resources on a Web server can be grouped in folders that correspond to Web projects in the workbench.

Project document root

7. Click Finish, and the wizard will create an empty project container primed with the appropriate content folder structure.

8. You can begin creating or importing content, using Web resource editors or the Import wizards:

Ready Static Project

Creating new J2EE Web projects

In the workbench, you create and maintain resources for Web applications in Web projects. Use the Create a Web Project wizard to create a new J2EE Web project, as follows:

1. To launch the Web Project wizard in the Web perspective, select File > New > Web Project. Note: From other perspectives, launch the Web Project wizard by selecting File > New > Project. Then select the Web option, Web Project, and then the Next button.

2. Provide a name and storage location for the Web project.

3. Click the J2EE Web Project radio button.

4. Optionally, select one or more of the Web Project features, such as the Create a default CSS file checkbox, which creates a default CSS file (called Master.css) for any HTML and JSP files included in the project. You can also add custom tag libraries for various purposes. When you select a feature, a description is provided.

Dynamic Web Project

5. Click Next.

6. Specify the name of a new or existing Enterprise Application project that the new Web project should be associated with for purposes of deployment. NOTE: If you want to add a Web project as a module to another Enterprise Application project in the future, you can open the application.xml editor for the Enterprise Application project and select the Add option in the General page.

7. Specify a context root for the Web project. The context root is the Web application root, the top-level directory of your application when it is deployed to a Web server. You can change the context root after you create a project using the project Properties dialog, which you access from the project's context menu. The context root can also be used by the links builder to ensure that your links remain ready to publish as you move and rename files inside your project.

8. From the J2EE Level drop-down list, select the appropriate Sun Microsystems Servlet and JSP specification level for the dynamic elements to be included in your Web project. It is recommended that any new servlets and JSP files that you expect to create should adhere to the latest specification level available; previous specification levels are offered to accomodate any legacy dynamic elements that you expect to import into the project. By default, the Web project's J2EE level is set to the Workbench's J2EE level. Project preferences are initialized when the project is created. If you want to update these preferences, select Window > Preferences > J2EE, and then choose the appropriate J2EE level from the J2EE property settings. If you choose to create a new Enterprise Application project for this Web project, the J2EE level setting controls the level of the resulting EAR file as well.

Project Wizard

9. Click Next if you wish to configure module dependency information, or if you need to supply additional information for any of the Web project features that you selected in the first page of the wizard. Otherwise, click Finish, the wizard will create an empty project container primed with the appropriate folder structure, along with a deployment descriptor file that describes the current project.

10. In the Module Dependencies page, select and set dependent JAR files for modules within the associated Enterprise Application project. Specifying dependencies on this page updates the runtime classpath and Java project build path with the appropriate JAR files. Supply values for the following fields:

  • The Project name field displays the Web project name entered on the previous page of the wizard.
  • The Enterprise Application project name field displays the Enterprise Application project name entered on the previous page of the wizard.
  • Use the Available dependent JARs field to select JAR files that are required at runtime.

The Manifest Class-Path displays the classpath for the selected JAR file(s).

Module Dependencies

11. Click the Next button if you need to supply additional information for any of the Web project features that you selected in the first page of the wizard. If you click Finish, the wizard will create an empty project container primed with the appropriate folder structure, along with a web.xml file that describes the current project.

Ads

12. Click Finish

13. The new project will reflect the J2EE folder structure that specifies the location of web content files, class files, classpaths, the deployment descriptor, and supporting metadata. You can begin creating or importing content, using Web resource editors or the Import wizards.

Ready Dynamic Project

_____________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.



 
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