0
java.lang.Error: Unresolved compilation problem: 
The method getRequest() from the type BaseAction 
refers to the missing type HttpServletRequest

これが方法です:

public String list(){

    QueryFilter filter=new QueryFilter(getRequest());
    filter.addSorted("rowNumber", "asc");
    List<Section> list= sectionService.getAll(filter);

    Type type=new TypeToken<List<Section>>(){}.getType();
    StringBuffer buff = new StringBuffer("{success:true,'totalCounts':")
    .append(filter.getPagingBean().getTotalItems()).append(",result:");

    Gson gson=new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
    buff.append(gson.toJson(list, type));
    SysConfig sectionColumn = sysConfigService.findByKey("sectionColumn");
    buff.append(",columnType:");
    if(sectionColumn!=null){
        buff.append(sectionColumn.getDataValue());
    }else{
        buff.append("2");
    }
    buff.append("}");

    jsonString=buff.toString();

    return SUCCESS;
}

どうすればこの問題を解決できますか?

4

1 に答える 1