struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject JSON Result Behavior with Struts 2.2.3
Date Wed, 01 Jun 2011 16:13:32 GMT
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:

View raw message