I am extremely new to spring, but I managed to come up with this code from my javascript
$scope.addMe = function(){
var params = {
date :111111,
username: 'thisGuy',
notetext: 'this is a new note that was just added'
};
$http.post(afHttp.baseUrl + "/blah/" + $scope.dog.id, {params: params})
.success(function(data) {
});
}
and in elclipe I have
@POST
@Path("/{id}")
public void getAddMssg(@PathParam("id") int id, @FormParam("date") int date, @FormParam("username") String username, @FormParam("notetext") String notetext) {
System.out.println("date: "+date);
System.out.println("username: "+ username);
System.out.println("notetext: "+ notetext);
System.out.println("id: "+ id);
}
And when I look at my console log in eclipse it says
date: 0
username: null
notetext: null
id: 123124
What am I doing wrong? I have been working on this for awhile with no avail. Can someone please help?
Oh sorry I forgot to add I am using angularjs.