I have an web application using Spring Boot and a jetty server. I am making calls through ajax but instead of them getting mapped to my Spring Controller they are resulting in an error.
The error:
2016-06-16 18:55:25.450 WARN 11772 --- [tp1170788511-19] o.eclipse.jetty.servlet.ServletHandler : Error for /test
java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpMethod
and:
2016-06-16 18:55:25.451 WARN 11772 --- [tp1170788511-19] o.e.jetty.server.AbstractHttpConnection : /test
java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpMethod
The Ajax:
$.ajax({
url: "/test",
type: "POST",
async: false,,
success: function (response) {
...
}
The Controller:
@Controller
public class LoginController {
@RequestMapping(value="/test", method=RequestMethod.POST)
public String countingForm(Model model) {
System.out.println("test");
return "test";
}
}
If anyone could shine some light on whats going wrong that would be greatly appreciated.