You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Fred Ge (JIRA)" <ji...@apache.org> on 2016/06/23 12:38:16 UTC

[jira] [Comment Edited] (WW-4649) SMI do not work with JSON plugin

    [ https://issues.apache.org/jira/browse/WW-4649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346349#comment-15346349 ] 

Fred Ge edited comment on WW-4649 at 6/23/16 12:38 PM:
-------------------------------------------------------

sorry post error


was (Author: fredgero):
Hi,

Here are some details I can provide:

- nothing has changed in the webapp except struts version : 2.5 > 2.5.1
- it worked too with previous version < 2.5

struts.xml
{noformat}
<package name="shared_package" extends="struts-default,json-default"  strict-method-invocation="false">
	...
	<interceptor-stack name="commonStack">
		<interceptor-ref name="json">
			<param name="enableSMD">false</param>
		</interceptor-ref>
	...
</package>
<package name="main" namespace="/" extends="shared_package"  strict-method-invocation="false">
	
</package>
{noformat}

JS : AngularJS (1.5) request:
{noformat}
$http({method: 'POST',
	url: '/MyAction_method',
	data : myJsObject,
	}).success(function(data, status, headers, config) {
		// ...
	});
{noformat}

Request headers:
{noformat}
Accept:application/json, text/plain, */*
Accept-Encoding:gzip, deflate
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Content-Length:949
Content-Type:application/json;charset=UTF-8
{noformat}

In the action the object corresponding to myJsObject is not deserialized, so it is null.
No exception in logs, except the one due to NullPointerException.





> SMI do not work with JSON plugin
> --------------------------------
>
>                 Key: WW-4649
>                 URL: https://issues.apache.org/jira/browse/WW-4649
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>         Environment: struts 2.5.1 with jspn plugin
>            Reporter: Arty Marty
>             Fix For: 2.5.2
>
>
> SMI do not work with json plugin



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)