# Oracle Java Cloud Service - SaaS Extension

## All the productivity of Java, without the IT.

- Home
- CLI-Javacloud.jar
- CLI-Javacloud.properties
- CLI-Filesystem Shell
- CLI-Configuration Shell
- CLI-Whitelist.jar
- ANT Tasks
- Maven Plugin
- SDK-Local Weblogic Domain
- Examples
- Sample Applications

Sample Applications

### Samples

Sample applications are packaged in the SDK. You can build the samples and deploy them to a Java Cloud Service instance - SaaS Extension.

#### How to Build the Samples

Before you can build the samples, you need Apache Ant (1.7) installed and configured on your machine. Then perform these steps:

- Unzip the SDK and set the SDK_HOME environment variable to point to the unzipped directory.
  For example: `export SDK_HOME=/Users/velsubra/Desktop/work/sdk/oracle-javacloud-sdk`
- `cd $SDK_HOME/samples`
- Edit `build.common.properties`
- To build all the samples and install them:
  - `ant clean build install`
- To build a single sample:

- `cd`
- ant clean build install

#### Available Ant Targets in the build.xml File

There are various Ant targets that you can use against the samples.

- clean
- build
- delete
- start
- stop
- update
- list-applications
- list-jobs
- list-service-instances

To build a Maven sample, click here.

#### Available Samples

Samples
S.NO | Sample Name | Sample Directory | Description | Technologies Used
--- | --- | --- | --- | ---
1 | greeting-sso | security/greeting-sso | Checks if the user has access to a servlet. | Servlet, SSO authentication and Role based authorization.
2 | greeting-basic-auth | security/greeting-basic-auth | Checks if the user has access to a servlet. | Servlet, BASIC Authentication and Role based authorization.
3 | greeting-form-auth | security/greeting-form-auth | Checks if the user has access to a servlet. | Servlet, FORM Based Authentication and Role based authorization.
4 | sso-advanced | security/sso-advanced | Demonstrates public accessibility of an application. This application has the following web modules. sso-fully-secured - A WAR in which all the resources are secured. sso-unsecured - A WAR in which all the resources are public. An application has to explicitly opt out of the default security. sso-partially-secured - A WAR in which selected section of the resources are secured. sso-perimeter-security - A WAR without any security configuration specified. The application is not accessible to public. This is the default security posture to prevent the application from being unintentionally publicly accessible. | JSP, SSO
5 | wss-unt | webservices/wss-unt | A WSS-Username token protected web service that has two methods, hello and callHello, to demonstrate inbound(hello) and outbound(callHello) invocations. | WebService, WebService Client and OWSM
6 | wss-saml | webservices/wss-saml | A WSS-SAML token protected web service which has an operation called hello. The access to web service is granted by a basic authentication which generates saml token. | WebService, WebService Security, SAML
7 | ajaxguessnumber | ee6/ajaxguessnumber | A simple JSF-based application. | JSF2.0, AJAX
8 | guessnumber | ee6/guessnumber | A simple managed bean-based application. | ManagedBean and Facelets
9 | bookstore1 | ee5/bookstore1 | A Java EE 5 bookstore application. | Servlet, JPA
10 | petstore | petstore | Java EE petstore application. | Java EE technologies.
11 | db | db/visitors | Performs Database CRUD operations. | JPA
12 | date | date | Shows date in different languages. | i18n
13 | runtime-tester | maven/runt-timetester | A Maven project that tests whether Java code runs on Oracle Cloud. | Maven, Run-time testing
14 | mvn-logger | maven/mvn-logger | A Maven project that demonstrates JDK-based logging. | Maven, JDK logging
15 | filebrowser | maven/filebrowser | A Maven project that shows file access through java.io.File API. | Maven, Local File System Access
16 | messagedrivenbean | maven/messagedrivenbean | A Maven project that creates message-driven beans that use the local JMS configuration. | Maven, Message-driven bean