I'm attempting to pass the word "hello" to the backend of my code using the URL. However, instead of sending the string "hello" to my Java backend code, it's sending an empty string.
Below is my backend code:
@GET
@Path("getJob/{stepName}")
@Produces(MediaType.APPLICATION_JSON)
public List<Step> getStepByName(@PathParam("stepName") String stepName) {
String x = stepName;
System.out.println(x);
return null;
//List<ModuleProcCount> pusher = statements.inMod(dbc,theReader);
//for(ModuleProcCount p : pusher) {
// input.add(p.modName + " " + p.modCount);
//}
// return result;
}
And here is my JavaScript:
performanceApp.controller("homectrl", function($scope, $http){
var x = "rest/performance/getJob/hellp";
$http.get(x).then(function(response){
});
});
I'm not sure what I'm doing wrong or what the issue is with this code, as it seems pretty straightforward.