This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 22846ee Updates production by Jenkins
22846ee is described below
commit 22846eec50cd82c7e35095cd39d8fbe7638d0b9c
Author: jenkins <builds@apache.org>
AuthorDate: Wed Nov 29 08:11:09 2017 +0000
Updates production by Jenkins
---
content/plugins/rest/index.html | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/content/plugins/rest/index.html b/content/plugins/rest/index.html
index 7d6d2ab..6ce42fd 100644
--- a/content/plugins/rest/index.html
+++ b/content/plugins/rest/index.html
@@ -510,14 +510,20 @@ http://my.company.com/myapp/movies/superman.json
<p>First you need to add the jackson dependency to your web application by downloading
the jar file and put it under WEB-INF/lib or by adding following xml snippet to your dependencies
section in the pom.xml when you are using maven as build system.</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependency></span>
- <span class="nt"><groupId></span>org.codehaus.jackson<span
class="nt"></groupId></span>
- <span class="nt"><artifactId></span>jackson-jaxrs<span class="nt"></artifactId></span>
- <span class="nt"><version></span>1.9.13<span class="nt"></version></span>
+ <span class="nt"><groupId></span>com.fasterxml.jackson.core<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>jackson-core<span class="nt"></artifactId></span>
+ <span class="nt"><version></span>${jackson.version}<span
class="nt"></version></span>
+<span class="nt"></dependency></span>
+<span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>com.fasterxml.jackson.core<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>jackson-databind<span
class="nt"></artifactId></span>
+ <span class="nt"><version></span>${jackson.version}<span
class="nt"></version></span>
<span class="nt"></dependency></span>
-
</code></pre>
</div>
+<p>where <code class="highlighter-rouge">${jackson.version}</code> is the
latest available version of the libs, right now it is <code class="highlighter-rouge">2.9.2</code>.</p>
+
<p>Now you can overwrite the Content Handler with the Jackson Content Handler in the
struts.xml:</p>
<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt"><bean</span>
<span class="na">type=</span><span class="s">"org.apache.struts2.rest.handler.ContentTypeHandler"</span>
<span class="na">name=</span><span class="s">"jackson"</span> <span
class="na">class=</span><span class="s">"org.apache.struts2.rest.handler.JacksonLibHandler"</span><span
class="nt">/></span>
@@ -529,12 +535,9 @@ http://my.company.com/myapp/movies/superman.json
<span class="c"><!-- Set encoding to UTF-8, default is ISO-8859-1 --></span>
<span class="nt"><constant</span> <span class="na">name=</span><span
class="s">"struts.i18n.encoding"</span> <span class="na">value=</span><span
class="s">"UTF-8"</span><span class="nt">/></span>
-
</code></pre>
</div>
-<p> </p>
-
<h3 id="settings">Settings</h3>
<p>The following settings can be customized. See the <a href="/core-developers/configuration-files.html">developer
guide</a>.
--
To stop receiving notification emails like this one, please contact
['"commits@struts.apache.org" <commits@struts.apache.org>'].
|