I ain't able to open the controller's method
var url = "UsersGroupReader";
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.onreadystatechange = processAccessGroupRequest;
req.open("GET", url, true);
req.send(null);
My controller is:
@RequestMapping(value = "UsersGroupReader", method = RequestMethod.GET)
public Vector<String> readUsersGroup(HttpServletRequest request,
HttpSession httpSession) {
The req.status I am receiving is 404 through AJAX.
The pattern in my web.xml is as follows:
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
I tried using UsersGroupReader.html in both the AJAX function and the controller but still unable to access the controller.
Can anyone help me spot the mistake?
Could be a duplicate of this, in vain even after following it.
Thanks in Advance
var url = "/UsersGroupReader.html";