blob: 71e87d90352ddb53eb6397f7672f2e13c3557620 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<html><head><title>JCDI Beans WebApp Sample</title></head>
<body>
<h1>Jersey CDI Sample</h1>
<p>This example demonstrates how to develop RESTful web service with
JCDI managed beans and a Servlet 3.0 Web container.</p>
<h2>Running the Example</h2>
<p>This example currently works only with a standalone GlassFish 3.1.x instance.
The easiest way to get the application running is to use the GlassFish Update Center client,
install "Jersey examples and documentation" IPS module from there
and follow instructions at the module README file in order to deploy the example.
If you have already installed from the Update Center, the module readme file should be
accessible <a href="../../README.html">here</a>
<p>After you successfully deploy the application, visit the following URLs:</p>
<blockquote>
<table border="1">
<tr>
<th>Description</th>
<th>URL</th>
<th>Expected Results</th>
</tr>
<tr>
<td>A managed bean with no use of injection whatsoever</td>
<td><code><a href="http://localhost:8080/jersey-cdi/helloworld">http://localhost:8080/jersey-cdi/helloworld</a></code></td>
<td><code>Hello World</code></td>
</tr>
<tr>
<td>Shows injection of context objects into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/simple">http://localhost:8080/jersey-cdi/simple</a></code></td>
<td><code>OK GET http://localhost:8080/jersey-cdi/simple</code></td>
</tr>
<tr>
<td>Shows injection of context objects and path parameters into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/other/c/d">http://localhost:8080/jersey-cdi/other/c/d</a></code></td>
<td><code>OTHER c d</code></td>
</tr>
<tr>
<td>Shows constructor injection of a path parameter in a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/echoconstructor/a">http://localhost:8080/jersey-cdi/echoconstructor/a</a></code></td>
<td><code>ECHO a</code></td>
</tr>
<tr>
<td>Shows injection of path and query parameters into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/echofield/b">http://localhost:8080/jersey-cdi/echofield/b</a></code></td>
<td><code>ECHO null b</code></td>
</tr>
<tr>
<td>A managed bean that uses (but does not inject) a path parameter.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/echo/a">http://localhost:8080/jersey-cdi/echo/a</a></code></td>
<td><code>ECHO a</code></td>
</tr>
<tr>
<td>Shows injection of context objects into the fields of a EJB Stateless Session bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/ejb/stateless">http://localhost:8080/jersey-cdi/ejb/stateless</a></code></td>
<td><code>1</code></td>
</tr>
<tr>
<td>Shows injection of query parameters into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/jcdibean/per-request">http://localhost:8080/jersey-cdi/jcdibean/per-request</a></code></td>
<td><code>null1</code></td>
</tr>
<tr>
<td>Shows injection of context objects into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/jcdibean/singleton">http://localhost:8080/jersey-cdi/jcdibean/singleton</a></code></td>
<td><code>1</code></td>
</tr>
<tr>
<td>Shows injection of context objects and query parameters into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/jcdibean/dependent/per-request">http://localhost:8080/jersey-cdi/jcdibean/dependent/per-request</a></code></td>
<td><code>null1</code></td>
</tr><tr>
<td>Shows injection of context objects into the fields of a managed bean.</td>
<td><code><a href="http://localhost:8080/jersey-cdi/jcdibean/dependent/singleton">http://localhost:8080/jersey-cdi/jcdibean/dependent/singleton</a></code></td>
<td><code>1</code></td>
</tr>
</table>
</blockquote>
</body>
</html>