Giter Site home page Giter Site logo

sample.javaee7.el30's Introduction

Sample Java EE 7 - Expression Language 3.0 Build Status

This application shows how to use some of the new EL 3.0 (Expression Language) functions.

Examples are provided for using:

  • Lambda expressions
  • Concatenation
  • New operators.

In addition, it provides a simple sample of a stand-alone servlet that shows EL in use without JavaServer Pages (JSP).

Getting Started

Browse the code to see what it does, or build and run it yourself!

Running in Eclipse

  1. Download and install Eclipse with the WebSphere Developer Tools.
  2. Clone this repository.
  3. Import the sample into Eclipse using File -> Import -> Maven -> Existing Maven Projects option.
  4. Right click on the project and select Run As -> Run on Server option. Find and select the Liberty profile server and press Finish.
  5. Go to: http://localhost:9080/sample.javaee7.el30/

Tips

After step 3, Eclipse may detect JSP EL (Expression Language) syntax errors. You can ignore these errors and disable the JSP validator for this project. To disable JSP validation in Eclipse:

  1. Right-click the project and select Properites -> Validation.
  2. Check the Enable project specific settings checkbox.
  3. Uncheck the JSP syntax validator checkboxes.
  4. Click OK.

Running with Maven

This project can be built with Apache Maven. The project uses Liberty Maven Plug-in to automatically download and install Liberty profile runtime from the Liberty repository. Liberty Maven Plug-in is also used to create, configure, and run the application on the Liberty server.

Use the following steps to run the application with Maven:

  1. Execute full Maven build. This will cause Liberty Maven Plug-in to download and install Liberty profile server.

    $ mvn clean install
  2. To run the server with the EL 3.0 application execute:

    $ mvn liberty:run-server

Once the server is running, the application will be available under http://localhost:9080/sample.javaee7.el30/.

Deploying to Bluemix

Click the button below to deploy your own copy of this application to Bluemix.

Deploy to Bluemix

Once the application is deployed and running in Bluemix, it will be available under http://MYAPPNAME.mybluemix.net/sample.javaee7.el30/.

Running with Gradle

This project can also be built and run with Gradle. The provided build.gradle file applies the Liberty Gradle Plug-in and is configured to automatically download and install the Liberty Java EE Web Profile 7 runtime from Maven Central. The Liberty Gradle Plug-in has built-in tasks that can be used to create, configure, and run the application on the Liberty server.

Use the following steps to run the application with Gradle:

  1. Execute the full Gradle build. The Liberty Gradle Plug-in will download and install the Liberty server.

    $ ./gradlew clean build
  2. To start the server with the Servlet sample execute:

    $ ./gradlew libertyStart

    Alternatively, execute the run command:

    $ ./gradlew libertyRun --no-daemon

Once the server has started, the application will be available under http://localhost:9080/sample.javaee7.el30.

  1. To stop the server, execute:
    $ ./gradlew libertyStop

Please refer to the ci.gradle repository for documentation about using the Liberty Gradle Plug-in.

Notice

© Copyright IBM Corporation 2015, 2017.

License

This information contains sample code provided in source code form. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample code is written.

Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR ECONOMIC CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THE SAMPLE SOURCE CODE. IBM SHALL NOT BE LIABLE FOR LOSS OF, OR DAMAGE TO, DATA, OR FOR LOST PROFITS, BUSINESS REVENUE, GOODWILL, OR ANTICIPATED SAVINGS. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE SOURCE CODE.

sample.javaee7.el30's People

Contributors

romosme avatar jjvilleg avatar mattbsox avatar jgawor avatar

Watchers

James Cloos avatar Charles Y. Tian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.