Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Senthilkumar Shanmugam
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

×

Warning

JUser: :_load: Unable to load user with ID: 2803

Goals

In this tutorial you will be able to:

Configure Java Cloud Service connections in JDeveloper

Deploy a HelloWorld application to JCS

 

Overview

Oracle Java Cloud Service 13.2 currently supports Oracle JDeveloper, NetBeans and

Oracle Enterprise Pack for Eclipse as an Integrated Development Environment to

develop applications for Cloud. The scope of this workshop is the usage of Oracle

JDeveloper IDE, so, in this practice you will first install JDeveloper 11.1.1.7.1 in your

local environment. This version should be downloaded from an authorized Oracle site

(i.e. cloud.oracle.com, Oracle Software Delivery Cloud, Oracle Technology Network).

One requirement is to have network connectivity to the Oracle Cloud instances provided

by your instructor (or previously arranged).

 

Instructions

 

  1. On first JDeveloper startup you will be prompted to select a Role. Depending on the

role you choose a set of features will become available in JDeveloper. For customizing

an ADF application (MDS layer) you will be required to select Customization Layer.

More information can be found in Oracle Fusion Middleware Fusion Developer’s Guide

for Oracle Application Development Framework.

For now you should select Default Role to enable all technologies and uncheck the

option Always prompt for role selection on startup. Then click on Ok.

  

2) Start using JDeveloper. Explore all the menu options available to become more familiar

with the IDE.

 

3) Go back to JDeveloper and click on Tools -> Preferences:

 

4) Under the Preferences window select Oracle Cloud. You can also type in “Oracle Cloud” on

Search textbox. Then confirm the location where Oracle SDK was installed. By default,

JDeveloper 11.1.1.7.1 comes with SDK version 13.2, while the JCS instances of this

workshop are 14.1. So it is necessary to download and set the new JCS SDK 14.1. Go

to http://www.oracle.com/technetwork/middleware/weblogic/downloads/java-cloud-sdk-1848874.html and then Download.

(Please use the latest SDK available, it will be in sync with the current JCS service.

Usually it is also compatible with previous JCS versions. At the SDK download page you can see:

"Download this version if your Oracle Java Cloud Service is of release version 14.1.x or 15.x.x "

So, use 16.1.1.0.)

 

5) Download and save the new JCS SDK  and set Oracle Cloud preference accordingly

through Tools | Preferences.

 

Now you are ready to set up a connection to an instance of Oracle Java Cloud Service.

Click on the menu View -> Resource Palette or use the shortcut Ctrl+Shift+O to open

up the Resource Palette.

 

In the Resource Palette IDE Connections panel choose New Connection and then Application Server by clicking the new buttondrop down.

On the Create Application Server Connection Wizard, the first step is to specify a Connection name and Select the Connection type.

Give the Connection Name as jcs  and Choose Oracle Cloud as Connection Type and click on Next.

 

Provide the username and password you received.

 

Provide the Data Center, Identity Domain and Service Name you previously received and click on Next.

 

Finally, test your connection to the server. If the test fail, review Authentication and Configuration settings and try again. You might have to set up JDeveloper proxy (Tools-> Preferences -> Web Browser and Proxy). Otherwise, click on Next.

  

Cloud Server connection is ready; we can now start creating our first Cloud

Application. Click on Finish to close the window.

 

Click on New Application.

 

Set the application name to “HelloWorldUser103”. Select Java EE Web Application template and then click on

Next (Application Name can be user specific).

 

Now click on the Next button from step 2 to 6 (last window) and leave all options with

their default value.

 

 

At last when you click on Finish, your application will be created with two projects: Model and ViewController.

 

Right click on View Controller project and select Project Properties.

 

We now need to setup the Java EE Web-Context Root and Application name. Click on Java EE Application option and type in HelloWorldUser103 for both fields. Click on OK to confirm and get back to the application.

Save your application to confirm all the changes.

 

Now it’s time to create our first page. Under ViewController project, go to Web Content

folder, right click on that folder and choose New.

 

At the New Gallery window under Web Tier, JSP Categories, select JSP item.

 

Enter the File Name “hello.jsp” and click on OK.

 

The page should be displayed in JDev as hon in the image below.

At the bottom of the window, select the “Source” tab and add the following code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<%@ page contentType="text/html;charset=windows-1252"%>

<html>

 <head>

   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>

   <title>hello</title>

 </head>

 <body>

 <h1> Hello From Apps2Fusion . Great time in Learning PAAS cloud</h1>

 </body>

</html>

Please note that JDeveloper has already provided you most part of the code. You

will just have to insert the code between <body> tag.

 

Next step is to set up the deployment profile. Right click on ViewController project ->

Deploy -> New Deployment Profile

 

At the New Gallery Window under Deployment Profiles, select WAR File.

 

Type in HelloWorldUser103 (Same name as that of Application) as the Deployment Profile Name and click on OK.

 

Review all options and click on OK to confirm.

 

HelloWorldUser103 will be available in the Deployment section of the Project Properties.

Click on OK to close the window.

 

 

In order to deploy your project to the Cloud Server, right click on ViewController.

project, select Deploy -> HelloWorldUser103.

Select Deploy to Application Server and click on Next.

 

Select the JavaCloudService server instance you previously created and then click on

Next.

 

Click on Finish to start deploying the Project into Java Cloud Service server.

 

Follow the deployment progress in the Deployment – Log window. You can view the

log file containing all the steps required to deploy an application to JCS, also, you

will have the URL address where your application will be available.

 

Open your browser and go to the URL where your application was deployed

displayed on the previous step. Don’t forget to include the name of the jsp file you are

opening, i.e.,

https://jcssaasextensitrial8915-inoracleindiatrial92050.java.us2.oraclecloudapps.com/HelloWorldUser103

Please note that your server URL might be different than jcssaasextensitrial8915-inoracleindiatrial92050.java.us2.oraclecloudapps.com. If you are not already logged into Java Cloud Service, you will be prompted for security credentials in order to have access to the page. After login you will be directed to your page .

 

 

You can also manage your application in Java Cloud Service through the Java Cloud Service

Console. Open your browser window and go to the URL, i.e.,

 

https://console.us2.cloud.oracle.com/em/faces/javaservice?serviceName=jcssaasextensitrial8915&identityGroup=inoracleindiatrial92050

 

From the Java Cloud Services Control Home page you can manage your applications,

connections, shared libraries, view logs etc. More information related to Java Cloud Service

can be found in documentation


Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  May 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
    1  2  3  4  5
  6  7  8  9101112
13141516171819
20212223242526
2728293031  

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner