[英]The method getRequest() from the type BaseAction refers to the missing type HttpServletRequest
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;
}
我怎么解決這個問題?
將servlet api添加到您的類路徑中。 這樣可以解決問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.