RenderRequest的@RequestMapping错误

时间:2011-12-22 12:01:59

标签: spring request portlet

我正在为我的portlet RequestMapping

尝试RenderRequest
    @RequestMapping("view.jsp", params="test")
public void doSome(RenderRequest request, RenderResponse response){
    }

但是我得到了多个错误,比如

Multiple markers at this line
- Syntax error on token ""view.jsp"", invalid MemberValuePairs
- The attribute value is undefined for the annotation type 
 RequestMapping
- RequestMapping cannot be resolved to a type

为什么?

1 个答案:

答案 0 :(得分:5)

您需要使用value属性。您还需要添加导入org.springframework.web.bind.annotation.RequestMapping

@RequestMapping(value="view.jsp", params="test")
public void doSome(RenderRequest request, RenderResponse response){
}