![]() |
![]() |
![]() |
![]() |
In Workshop you create and build applications (or more formally, enterprise applications). This topic introduces applications and their organization in Workshop.
Workshop organizes the resources (projects, files and folders) of your application in the following way:
For an introduction to creating a workspace and setting up a simple enterprise application and its projects, review the Getting Started tutorial. To look at sample applications, look at the sample applications.
In Workshop, you can have only one workspace open at a time. A workspace is a single top level folder that contains one or more applications and component projects/modules. Workspaces are described in detail in the Eclipse help system available by clicking Help > Help Contents and then choosing Workbench User Guide.
To open a new workspace, click File > Switch Workspace and click Browse to choose a new workspace folder.
To create a new workspace, click File Switch Workspace and click Browse to navigate to the location of the new workspace folder. Then click Make New Folder to create a new workspace folder.
A workspace is a directory. To delete a workspace and its contents, simply delete the directory on your computer.
An enterprise application (often called simply an application) in Workshop is the collection of all resources that are built together and then deployed as a unit to an instance of WebLogic Server. Enterprise application components can also be archived as a unit into an Enterprise ARchive (EAR) file.
Enterprise applications consist of a collection of projects which appear as siblings in the workspace. For every enterprise application you must create the following an enterprise application (EAR) project that serves as the assembly point for all of the projects in the application.
The Java code and other files of the application are then contained in additional projects: dynamic web project(s), web service project(s), EJB project(s), and/or utility project(s).
An enterprise application is different from a web application. Web application refers to a collection of resources, typically HTML or JSP pages, that allow users to access functionality via the Web. An enterprise application may contain zero or more web applications.
An application should represent a related collection of business solutions. For example, if you were building an e-commerce site you might design an application that includes web applications for catalog shopping and customer account management and the components that support them (Java controls, EJBs, etc.). You might also need to deploy a human resources application for use by your employees. The human resources application is not related to the e-commerce application. Therefore, in Workshop you would probably create two applications to separate these disparate business functions.
When creating an enterprise application, the normal process is to
To create a new enterprise application project, click File > New
> Project and expand J2EE. Choose Enterprise
Application Project. After specifying the project name and choosing
the facets, the third screen of the installation wizard allows you to click
New Module to create initial J2EE module projects. This
is not recommended because it creates Eclipse projects, not Workshop projects. For a more detailed description of how to create an
EAR project, see Tutorial:
Getting Started with Workshop Platform.
A project groups the files of a component of an application.
In Workshop, the available project types are:
Note that the Eclipse platform provides other project types. However Workshop features work only with the project types supported by Workshop.
As you develop an application, you may need to create new projects within the application for the following reasons:
Each project should contain components that are closely related to each other. If, for example, you wanted to created one or more web services that expose order status to your customers and also one or more web services that expose inventory status to your suppliers it might make sense to organize these two sets of unrelated web services into two projects.
If you want to reuse controls or Java classes in multiple components, it would make sense to segregate the Java classes into a separate utility project.
There are two common methods for organizing your projects in workspaces:
You can archive projects and workspaces either as self-contained ZIP files or through source control. The workspace and project folders contain metadata that should not be checked in to source control. See Working with Source Control for more information.
![]() |
![]() |
![]() |
||||||||||||
![]() |
|
![]() |
||||||||||||
![]() |
![]() |
![]() |
Enterprise Application (EAR) projects:
EAR projects appear as siblings to the other projects in a workspace but functionally, they link together projects and do not contain any of the content of your application. A single dynamic web project (web application) can be deployed without an EAR project, but more complex applications require an EAR project for correct deployment.
When an EAR project is created, by default it contains the following facets:
The EarContent directory contains the following:
![]() |
![]() |
![]() |
||||||
![]() |
|
![]() |
||||||
![]() |
![]() |
![]() |
Enterprise Java Beans (EJBs) are Java software components of enterprise applications. The J2EE Specification defines the types and capabilities of EJBs as well as the environment (or container) in which EJBs are deployed and executed. From a software developer’s point of view, there are two aspects to EJBs: first, the development and deployment of EJBs; and second, the use of existing EJBs from client software. An EJB Project provides support for creating and deploying new EJBs.
When an EJB project is created, by default it contains the following facets:
and can optionally have
Note that if an EJB project has dependencies on other EJB projects or on utility projects, you must create the dependency explicitly, they are not set when the project is created.
The src directory contains the user's Java source files. Creating a package causes a new folder to be created in the src folder. Beans are then created within the packages.
Dynamic web projects are used to create web applications.
User interface components are constructed from Java Server Pages (JSPs), which are web pages that can interact with server resources to produce dynamic content. Workshop allows you to create page flows that define and contain the logic required to connect multiple JSPs.
A dynamic web project can contain multiple page flows.
Each dynamic web project ultimately produces a J2EE module, each of which is included in the complete Workshop application's EAR file when the application is built for deployment.
The contents of web projects are accessed via URLs.
When a dynamic web project is created, by default it contains the following facets:
and may contain the following optional facets, as required:
The src and WebContent directories contain:
![]() |
![]() |
![]() |
||||||
![]() |
|
![]() |
||||||
![]() |
![]() |
![]() |
Note that when you create a new page flow, a folder is created inside the src folder to contain the Java controller file and any other Java source files associated with the page. A folder of the same name is created inside the web folder to contain the JSP files associated with the page flow.
Creating a package causes a new folder to be created in the src folder. You can also create folders and files explicitly in the src directory.
Web service projects are used to develop web services that conform to standards such as SOAP for message exchange, XML for messages to/from the service, and a WSDL that specifies the web service's public interface.
Web services are typically used to expose enterprise application logic to other applications (as opposed to users).
Web Services Description Language (WSDL) files are generated automatically when a web service is created within a web project.
Each web service project ultimately produces a J2EE module, each of which is included in the complete Workshop application's EAR file when the application is built for deployment.
The contents of web service projects are accessed via the test client which allows you to access each operation of the web service by clicking on a button.
When a web project is created, by default it contains the following facets:
and the following facets are optional, as needed:
The src and WebContent directories contain:
![]() |
![]() |
![]() |
||||||
![]() |
|
![]() |
||||||
![]() |
![]() |
![]() |
Note that when you create a new page flow, a folder is created inside the src folder to contain the Java controller file and any other Java source files associated with the page. A folder of the same name is created inside the web folder to contain the JSP files associated with the page flow.
Creating a package causes a new folder to be created in the src folder. You can also create folders and files explicitly in the src directory.
A utility project is a place to develop or collect general-purpose Java code that is not directly part of special entities such as web services, controls or EJBs. For example, a utility Project might hold shared controls or Java code for a library of string formatting functions that are used in web services and JSPs in other projects in the application.
When a utility project is created, by default it contains the following facets:
The src directory contains the user's Java source files. Creating a package causes a new folder to be created in the src folder. You can also create folders and files directly in the src directory.
Note that if a utility project has dependencies on other utility projects or on EJB projects, you must create the dependency explicitly, they are not set when the project is created.
Tutorial: Getting Started with Workshop Platform
![]() ![]() |