struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: JSON Result Behavior with Struts 2.2.3
Date Wed, 01 Jun 2011 16:35:31 GMT
Please disregard.

I found a discussion between Dave, Chris, and Jerry on this very issue
and it appears my problem was due to an interceptor placing data on the
stack incorrectly thus causing the action not to be on top of the stack
which was a code change during the 2.2.3 JSON plugin.

After their modiciation to use 

The expected results work as intended.


-----Original Message-----
Sent: Wednesday, June 01, 2011 11:14 AM
To: Struts Users Mailing List
Subject: JSON Result Behavior with Struts 2.2.3

I recently upgraded to Struts 2.2.3 and noticing that result types of
JSON are not behaving the same way as they did before.  For example, the
following action is setup:

--- Action Class ---


public class StatusAction implements ActionSupport 
  private Map<String,String> list = new LinkedHashMap<String,String>();
  private String type;
  private IRepairService service;

  public void setType(String type) {
    this.type = type;

  public Map<String,String> getList() {
    return list;

  public String execute() 
  throws Exception {
    List<StatusCode> statuses = service.getStatusCodesByType(type);
    for(StatusCode statusCode : statuses) 

    return SUCCESS;

--- Struts Action Mapping ---

<action name="statusSelectList"
  <result name="success" type="json"/>

In the JSP; it is expecting to find variable "list" on the top of the
OGNL value stack which would be the action invoked.  This worked fine
when I was using; however after upgrading to 2.2.3; I am finding
that the JSON response only contains the following:


Was there some fundamental change that I have overlooked?


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message