blob: 52723504cf8a6fbd01abc0ac744329bdebb2d109 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<title>Apache Wink : JAX-RS Application Configuration</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
Apache Wink : JAX-RS Application Configuration
<div class="pagesubheading">
This page last changed on Sep 10, 2009 by <font color="#0050B2">michael</font>.
<h2><a name="JAX-RSApplicationConfiguration-Applications"></a>Applications</h2>
<p>A JAX-RS application consists of one or more resources and zero or more providers. A JAX-RS application is packaged as a Web application in a .war file. The Application subclass, resource classes, and providers are packaged in WEB-INF/classes file and the required libraries are packaged in WEB-INF/lib. Included libraries can also contain resource classes and providers as desired.<br/>
When using a Servlet 3 container, the Application subclass is optional. By default, all root resource classes and providers packaged in the web application must be included in the published JAX-RS application.</p>
<h3><a name="JAX-RSApplicationConfiguration-IncludingSubclasses"></a>Including Subclasses</h3>
<p>An Application subclass can be included in a .war file to override the default behavior. If both getClasses and getSingletons return an empty list then the default "willset" of classes must be used. The implementations should support the Servlet 3 framework pluggability mechanism to enable portability between containers and to avail themselves of container-supplied class scanning facilities.</p>
<h3><a name="JAX-RSApplicationConfiguration-ServletContainers"></a>Servlet Containers</h3>
<p>When using a non-JAX-RS aware servlet container, the servlet-class or filter-class element of the web.xml descriptor should name the JAX-RS implementation-supplied Servlet or Filter class respectively. The application-supplied subclass of the application is identified, using an init-param with a param-name of the "".</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<td height="12" background=""><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
<td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>