blob: b98c32f66ea2f5fdd8ac914a4742fa863bd2ae98 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Apache Wink : 5.10 Admin Views</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
Apache Wink : 5.10 Admin Views
</span>
</div>
<div class="pagesubheading">
This page last changed on Oct 13, 2009 by <font color="#0050B2">michael</font>.
</div>
<h1><a name="5.10AdminViews-AdministrationViews"></a>Administration Views</h1>
<p>Apache Wink provides administration views in order to help developers better understand the services that the REST application expose. There are two administration views, the "<b>application resource XML view</b>" and the "<b>resource registry XML view</b>".</p>
<h2><a name="5.10AdminViews-ApplicationResourcesXMLView"></a>Application Resources XML View</h2>
<p>The application resource XML view shows the way the application is exposed to the user, it exposes the REST resources with their URI templates, the HTTP methods that are supported by the resources and the consume/produces MimeType supported by each method. This view can be used as a base for the service documentation.</p>
<h2><a name="5.10AdminViews-ResourceRegistryXMLView"></a>Resource Registry XML View</h2>
<p>The resource registry XML view shows the way that the application is developed, it is similar to the "<b>Application resources XML view</b>" but it also exposes the classes that implement resources and their priority in the registry. This view can be useful for debugging.</p>
<h2><a name="5.10AdminViews-Configuration"></a>Configuration</h2>
<p>By default these views are disabled, in order to activate them register the "<b>AdminServlet</b>" implemented by the <b>org.apache.wink.server.internal.servlet.AdminServletin</b> the web.xml file. No init parameters are required.</p>
<h3><a name="5.10AdminViews-Example"></a>Example</h3>
<p>The following code snippet is an example of a web application descriptor file.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;servlet&gt;</span>
<span class="code-tag">&lt;servlet-name&gt;</span>restSdkAdmin<span class="code-tag">&lt;/servlet-name&gt;</span>
<span class="code-tag">&lt;servlet-class&gt;</span>org.apache.wink.server.internal.servlet.AdminServlet<span class="code-tag">&lt;/servlet-class&gt;</span>
<span class="code-tag">&lt;/servlet&gt;</span>
<span class="code-tag">&lt;servlet-mapping&gt;</span>
<span class="code-tag">&lt;servlet-name&gt;</span>restSdkAdmin<span class="code-tag">&lt;/servlet-name&gt;</span>
<span class="code-tag">&lt;url-pattern&gt;</span>/admin<span class="code-tag">&lt;/url-pattern&gt;</span>
<span class="code-tag">&lt;/servlet-mapping&gt;</span>
</pre>
</div></div>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Nov 11, 2009 06:57</font></td>
</tr>
</table>
</body>
</html>