I'm referencing this Spring doc and trying to bind data to my view.
I wanted to request map my controller to, say /act1
and a method to doohickey.do
so the complete path will be /act1/doohickey.do
.
However, Eclipse says
The attribute path is undefined for the annotation type RequestMapping
And it gives me a CNF for org.springframework.web.context.support.XmlWebApplicationContext
I'm using Maven.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.2.0.RELEASE</version>
</dependency>
@Controller
@RequestMapping("/act1")
public class AnnotetedControllerTest1 {
@RequestMapping(path = "/formTest.do", method=RequestMethod.POST)
public ModelAndView formTest(HttpServletRequest request,
HttpServletResponse response
,@ModelAttribute Form1 form){
ModelAndView mav = new ModelAndView();
mav.setViewName("formTest1.jsp");
return mav;
}
}
Sorry, the snippets got stuck together.
Why does Eclipse say path is undefined while the document seems like it's suggesting that I can use this attribute ?
Update
I got it working by changing path
to value
but why ?
The document says path
. I don't believe the document to be erroneous. Perhaps, I'm looking at a wrong document ?