[jboss-cvs] JBossAS SVN: r95669 - projects/docs/enterprise/5.0/RESTEasy/en-US.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 28 04:26:21 EDT 2009
Author: laubai
Date: 2009-10-28 04:26:20 -0400 (Wed, 28 Oct 2009)
New Revision: 95669
Modified:
projects/docs/enterprise/5.0/RESTEasy/en-US/ExceptionMappers.xml
projects/docs/enterprise/5.0/RESTEasy/en-US/Guice1.xml
projects/docs/enterprise/5.0/RESTEasy/en-US/Installation_Configuration.xml
projects/docs/enterprise/5.0/RESTEasy/en-US/Interceptors.xml
projects/docs/enterprise/5.0/RESTEasy/en-US/JAX-RS_Content_Negotiation.xml
projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml
Log:
Added changes for JBPAPP-2963.
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/ExceptionMappers.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/ExceptionMappers.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/ExceptionMappers.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -79,12 +79,12 @@
<entry>Unauthorized. Security exception thrown if you use RESTEasy's simple annotation- and role-based security.</entry>
</row>
<row>
-<entry><exceptionname>InternalServerErrorException</exceptionname></entry>
+<entry><exceptionname>InternalServerError</exceptionname> <exceptionname>Exception</exceptionname></entry>
<entry>500</entry>
<entry>Internal Server Error.</entry>
</row>
<row>
-<entry><exceptionname>MethodNotAllowedException</exceptionname></entry>
+<entry><exceptionname>MethodNotAllowed</exceptionname> <exceptionname>Exception</exceptionname></entry>
<entry>405</entry>
<entry>Method Not Allowed. There is no JAX-RS method for the resource that can handle the invoked HTTP operation.</entry>
</row>
@@ -109,7 +109,7 @@
<entry>Internal RESTEasy error. Logged.</entry>
</row>
<row>
-<entry><exceptionname>DefaultOptionsMethodException</exceptionname></entry>
+<entry><exceptionname>DefaultOptionsMethod</exceptionname> <exceptionname>Exception</exceptionname></entry>
<entry>N/A</entry>
<entry>If the user invokes HTTP OPTIONS without a JAX-RS method, RESTEasy provides a default behavior by throwing this exception.</entry>
</row>
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/Guice1.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/Guice1.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/Guice1.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -36,19 +36,22 @@
Place these classes within your <filename>WAR WEB-INF/classes</filename> or in a <filename>JAR</filename> within <filename>WEB-INF/lib</filename>. Then, create your <filename>web.xml</filename> file. You will need to use the <literal>GuiceResteasyBootstrapServletContextListener</literal> like so:
</para>
<programlisting>
-<![CDATA[
<web-app>
<display-name>Guice Hello</display-name>
<context-param>
- <param-name>resteasy.guice.modules</param-name>
- <param-value>org.jboss.resteasy.examples.guice.hello.HelloModule</param-value>
+ <param-name>
+ resteasy.guice.modules
+ </param-name>
+ <param-value>
+ org.jboss.resteasy.examples.guice.hello.HelloModule
+ </param-value>
</context-param>
<listener>
- <listener-class>
- org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener
- </listener-class>
+ <listener-class>
+ org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener
+ </listener-class>
</listener>
<servlet>
@@ -64,7 +67,6 @@
</servlet-mapping>
</web-app>
-]]>
</programlisting>
<para>
<literal>GuiceResteasyBootstrapServletContextListener</literal> is a subclass of <literal>ResteasyBootstrap</literal>, so you can use any other RESTEasy configuration option within your <filename>web.xml</filename> file. Also note the <literal>resteasy.guice.modules</literal> context parameter. This can take a comma delimited list of class names that are Guice Modules.</para>
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/Installation_Configuration.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/Installation_Configuration.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/Installation_Configuration.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -101,7 +101,7 @@
<tbody>
<row>
<entry>
-<literal>resteasy.servlet.mapping.prefix</literal></entry>
+<literal>resteasy.servlet.mapping</literal> <literal>.prefix</literal></entry>
<entry>
no default</entry>
<entry>
@@ -141,7 +141,7 @@
</row>
<row>
<entry>
-<literal>resteasy.use.builtin.providers</literal></entry>
+<literal>resteasy.use.builtin</literal> <literal>.providers</literal></entry>
<entry>
true</entry>
<entry>
@@ -165,7 +165,7 @@
</row>
<row>
<entry>
-<literal>javax.ws.rs.core.Application</literal></entry>
+<literal>javax.ws.rs.core</literal> <literal>.Application</literal></entry>
<entry>
no default</entry>
<entry>
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/Interceptors.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/Interceptors.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/Interceptors.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -306,8 +306,7 @@
<para>
<literal>resteasy.append.interceptor.precedence</literal> appends the precedence family to the list. <literal>resteasy.interceptor.before.precedence</literal> lets you specify a family for your precendence to fall ahead of. <literal>resteasy.interceptor.after.precedence</literal> lets you specify a family for your precedence to follow after. For example:</para>
<programlisting>
-<![CDATA[
-web-app>
+<web-app>
<display-name>Archetype RestEasy Web Application</display-name>
<!-- testing configuration -->
@@ -345,8 +344,6 @@
</servlet-mapping>
</web-app>
-
-]]>
</programlisting>
<para>
In this <filename>web.xml</filename> file, we have defined three new precedence families: <literal>END</literal>, <literal>BEFORE_ENCODER</literal>, and <literal>AFTER_ENCODER</literal>. With this configuration, the family order would look like this:
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/JAX-RS_Content_Negotiation.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/JAX-RS_Content_Negotiation.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/JAX-RS_Content_Negotiation.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -89,6 +89,6 @@
</para>
<para>
- An alternative method used by JAX-RS is a combination of media-type, content-language, and content encoding, in addition to etags, last modified headers, and other pre-condititions. This is a more complex form of content negotiation, performed programmatically by the application developer via the <literal>javax.ws.rs.Variant</literal>, <literal>VarianListBuilder</literal>, and <literal>Request</literal> objects. <literal>Request</literal> is injected using the <literal>@Context</literal> annotation. (For more information, read the JavaDoc.)
+ An alternative method used by JAX-RS is a combination of media-type, content-language, and content encoding, in addition to etags, last modified headers, and other pre-conditions. This is a more complex form of content negotiation, performed programmatically by the application developer via the <literal>javax.ws.rs.Variant</literal>, <literal>VarianListBuilder</literal>, and <literal>Request</literal> objects. <literal>Request</literal> is injected using the <literal>@Context</literal> annotation. (For more information, read the JavaDoc.)
</para>
</chapter>
Modified: projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml
===================================================================
--- projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml 2009-10-28 07:47:47 UTC (rev 95668)
+++ projects/docs/enterprise/5.0/RESTEasy/en-US/Jaxb.xml 2009-10-28 08:26:20 UTC (rev 95669)
@@ -188,7 +188,7 @@
RESTEasy provides the required JAXB provider support for XML. It has several additional annotations to make application coding simpler.
</para>
<section id="XmlHeader">
- <title>><literal>@XmlHeader</literal> and <literal>@Stylesheet</literal></title>
+ <title><literal>@XmlHeader</literal> and <literal>@Stylesheet</literal></title>
<para>
To set an XML header when you output XML documents, use the <literal>@org.jboss.resteasy.annotations.providers.jaxb.XmlHeader</literal> annotation.
</para>
@@ -409,10 +409,14 @@
You must define a JSON-to-XML namespace mapping, or you will receive an exception:
</para>
<programlisting>
- java.lang.IllegalStateException: Invalid JSON namespace: http://jboss.org/books
- at org.codehaus.jettison.mapped.MappedNamespaceConvention.getJSONNamespace(MappedNamespaceConvention.java:151)
- at org.codehaus.jettison.mapped.MappedNamespaceConvention.createKey(MappedNamespaceConvention.java:158)
- at org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeStartElement(MappedXMLStreamWriter.java:241)
+java.lang.IllegalStateException: Invalid JSON namespace:
+ http://jboss.org/books
+at org.codehaus.jettison.mapped.MappedNamespaceConvention
+ .getJSONNamespace(MappedNamespaceConvention.java:151)
+at org.codehaus.jettison.mapped.MappedNamespaceConvention
+ .createKey(MappedNamespaceConvention.java:158)
+at org.codehaus.jettison.mapped.MappedXMLStreamWriter
+ .writeStartElement(MappedXMLStreamWriter.java:241)
</programlisting>
<para>
The <literal>@Mapped</literal> annotation fixes this problem. Place the <literal>@Mapped</literal> annotation on your JAXB classes, your JAX-RS resource method, or on the parameter that you are unmarshalling.
More information about the jboss-cvs-commits
mailing list