I have a controller class StudentController annotated with @RequestMapping(“/students”)
<code>@RequestMapping("/students")
@Controller
public class StudentController {}
</code>
<code>@RequestMapping("/students")
@Controller
public class StudentController {}
</code>
@RequestMapping("/students")
@Controller
public class StudentController {}
inside this class I have the following method
<code>@PostMapping("/processForm")
public String processForm ( ) {return "confirmation"; }
</code>
<code>@PostMapping("/processForm")
public String processForm ( ) {return "confirmation"; }
</code>
@PostMapping("/processForm")
public String processForm ( ) {return "confirmation"; }
but when running the app the method processForm does not execute, and I get “POST is not supported” error. is there a way around it without changing postmapping to getmapping? thank you.
the only thing that worked was changing postmapping to getmapping, but I was wondering if there is other way.
New contributor
Amy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.