java jdeveloper
TRANSCRIPT
-
8/12/2019 Java JDeveloper
1/12
Develop and Deploy a Java Application with Oracle JDeveloper
Follow these instructions to use Oracle JDeveloper to develop and deploy your Java application to the OEFHosted Environment.
Before you begin:
Obtain your OEF Hosted Environment URL, username, and password from your coach.
Make sure you have unrestricted Internet access and that proxy servers or firewalls are not blockingaccess to the below-noted resources.
Install the Software
Download and install the following software. Accept the default components for each install.
Java Development Kit 6
Oracle JDeveloper Studio Edition
Create your Application
Open Oracle JDeveloper Studio Edition:
Select Java EE Developer.
Create a new application:
Select New Application.
http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-6u27-downloads-458958.htmlhttp://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-6u27-downloads-458958.htmlhttp://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.htmlhttp://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.htmlhttp://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.htmlhttp://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-6u27-downloads-458958.html -
8/12/2019 Java JDeveloper
2/12
Select Custom Application.
Click OK.
Name your application:
In the Application Name field, enter a name for your application. In this example, we name theapplication HelloWorld.
Click Next.
-
8/12/2019 Java JDeveloper
3/12
Name your project:
In the Project Name field, enter a name for your project. In this example, we name the projectHelloWorld.
Select JavaServer Faces(JSF)underProject Features.
Move the selected feature from the Available window to the Selected window using the right arrowbutton.
Click Next.
-
8/12/2019 Java JDeveloper
4/12
On the next screen, accept the default settings.
Click Finish.
JDeveloper will create and configure the new project. The HelloWorldproject will be visible in the Projectsworkspace.
Create the welcome page:
Select theWeb Content.
-
8/12/2019 Java JDeveloper
5/12
Go to File > New.
Select the All Featurestab:
Go to Web Tier - > HTML under the Categorieslist.
Select HTML Pageunder the Itemslist.
Click OK.
Create the HTML file. This file is the welcome page for your application:
In the File Index field, enter index.xhtml.
The Directory field will pre-populate.
-
8/12/2019 Java JDeveloper
6/12
Place a check in the Create as XML file (*.xhtml) checkbox.
Edit the HTML file:
Open index.xhtml.
Select the Sourceoption to edit the page body.
Enter (or copy/paste) the following example code:
HelloWorld
Hello World!
-
8/12/2019 Java JDeveloper
7/12
Save the file.
Configure the HTML file as your welcome page:
Open web.xmlfile from the project file list.
Select the Pagestab.
Click the plus sign + to the right of the Welcome Files section and select the index.xhtml file.
Save the file.
Create the Deployment Profile
Create a new deployment method:
Right-click on the project.
Select Deploy.
Select New Deployment Profile.
-
8/12/2019 Java JDeveloper
8/12
On the resulting screen:
From the Profile Type list, select WAR File.
In the Deployment Profile Name field, enter a profile name. In this example, we name the profilewebapp.
Click OK.
On the next screen:
Accept the default components.
Click OK.
Create the WAR File
Deploy to WAR:
Right-click on the project.
Got to Deploy -> webapp.
-
8/12/2019 Java JDeveloper
9/12
Select deploy method:
Select Deploy to WAR.
Click Next.
Review the summary screen:
Click Finish.
-
8/12/2019 Java JDeveloper
10/12
Use the new WAR file to deploy the application in GlassFish in the next section.
Deploy your Application
Enter the URL for the Oracle GlassFish Server Administration Console. The format for th is URL ishttps://:8787/:
Open a browser.
In the address bar, enter your OEF Hosted Environment URL.
Add a colon : to the end of thisURL.
Add the Web Admin interface servers port 8787 followed by a forward slash /.
In this example, the Web Admin URL is https://xxddtjwifeogcqgavnwa.thinkquest.org:8787/.
In the login window, enter the OEF Hosted Environment username and password.
-
8/12/2019 Java JDeveloper
11/12
Deploy the application:
Go to Applications.
Click Deploy.
Click the radio button next to Packaged File to Be Uploaded to the Server .
Click Choose file.
Select the desired WAR file.
Make a selection from the Type dropdown list. In this example, we select Web Application.
-
8/12/2019 Java JDeveloper
12/12
In the Context Root field, enter the name of the context root for your application. In this example, wename our context root HelloWorld.
In the Application Name field, enter the name for your application. In this example, we name ourapplication HelloWorld.
Click OK.
The new application is now added to the Deployed Applicationslist.
Your application is deployed and can be run in a browser. In this example, the application URL is:
https://xxddtjwifeogcqgavnwa.thinkquest.org/HelloWorld