struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred Ge (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4649) SMI do not work with JSON plugin
Date Thu, 23 Jun 2016 12:36:16 GMT

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

Fred Ge commented on WW-4649:
-----------------------------

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)

Mime
View raw message