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

-5

将 servlet api 添加到您的类路径。这将解决问题

于 2013-04-24T11:39:18.183 回答