Name: sample.ejb.secure
Owner: WASdev
Description: A sample that demonstrates how to secure the sample.ejb application.
Created: 2017-08-31 15:59:19.0
Updated: 2017-08-31 16:28:41.0
Pushed: 2017-09-06 14:55:25.0
Homepage: null
Size: 13
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This sample demonstrates injection of an EJB into a servlet. The application consists of a servlet and stateless session bean. The servlet uses annotations to inject the stateless session bean, and then performs a call on the hello method of the bean. This sample also has an additional security layer added which will prompt the user for a username and password before granting access to the servlet.
This sample can be installed onto runtime versions 8.5.5.0 and later.
Application SecureEJBSample started in XX.XX seconds.
This project can be built with Apache Maven. The project uses Liberty Maven Plug-in to automatically download and install Liberty with Java EE7 Web Profile runtime from Maven Central. 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 sample execute:
n liberty:run-server
In your browser, enter the URL for the application: http://localhost:9080/secureejb-war/ (where port 9080 assumes the httpEndpoint provided in the sample server.xml has not been modified). In your browser, you should see the message “Hello secure EJB World”.
© Copyright IBM Corporation 2017.
nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.