This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/master by this push: new acb9079 Updates info about using Jackson handler acb9079 is described below commit acb90794550b9913f145873ddf863211af061086 Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Wed Nov 29 09:10:00 2017 +0100 Updates info about using Jackson handler --- source/plugins/rest/index.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/plugins/rest/index.md b/source/plugins/rest/index.md index fa5c816..a6f676d 100644 --- a/source/plugins/rest/index.md +++ b/source/plugins/rest/index.md @@ -283,18 +283,22 @@ The default JSON Content Handler is build on top of the [JSON-lib](http://json-l 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. - ```xml <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-jaxrs</artifactId> - <version>1.9.13</version> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>${jackson.version}</version> +</dependency> +<dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson.version}</version> </dependency> - ``` -Now you can overwrite the Content Handler with the Jackson Content Handler in the struts.xml: +where `${jackson.version}` is the latest available version of the libs, right now it is `2.9.2`. +Now you can overwrite the Content Handler with the Jackson Content Handler in the struts.xml: ```xml <bean type="org.apache.struts2.rest.handler.ContentTypeHandler" name="jackson" class="org.apache.struts2.rest.handler.JacksonLibHandler"/> @@ -306,11 +310,8 @@ Now you can overwrite the Content Handler with the Jackson Content Handler in th <!-- Set encoding to UTF-8, default is ISO-8859-1 --> <constant name="struts.i18n.encoding" value="UTF-8"/> - ``` - - ### Settings The following settings can be customized. See the [developer guide](/core-developers/configuration-files.html). -- To stop receiving notification emails like this one, please contact ['"commits@struts.apache.org" <commits@struts.apache.org>'].