Name: sample.javaee7.servlet.nonblocking
Owner: WASdev
Description: Demonstrates how to use non-blocking I/O by using new APIs added to ServletInputStream and ServletOutputStream. #JavaEE7
Created: 2015-11-11 08:09:02.0
Updated: 2017-06-07 20:26:01.0
Pushed: 2017-10-24 16:33:10.0
Size: 101
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This application demonstrates how to use non-blocking I/O by using new APIs added to ServletInputStream and ServletOutputStream.
The example includes usage of ReadListener and WriteListener interface APIs.
Browse the code to see what it does, or build and run it yourself.
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:
Execute full Maven build. This will cause Liberty Maven Plug-in to download and install Liberty profile server.
n clean install
To run the server with the Servlet Non-Blocking application execute:
n liberty:run-server
Once the server is running, the application will be available under http://localhost:9080/sample.javaee7.servlet.nonblocking/.
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:
Execute the full Gradle build. The Liberty Gradle Plug-in will download and install the Liberty server.
gradlew clean build
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.servlet.nonblocking.
gradlew libertyStop
Please refer to the [ci.gradle] repository for documentation about using the Liberty Gradle Plug-in.
Click the button below to deploy your own copy of this application to Bluemix.
Once the application is deployed and running in bluemix, it will be available under http://MYAPPNAME.mybluemix.net/sample.javaee7.servlet.nonblocking/.
© Copyright IBM Corporation 2015, 2017.