404 returned while making rest call from velocity to java using jquery

Ashish Biswal February 26, 2019

Velocity :-

AJS.${D}.ajax({
url: "http://localhost:2990/jira/rest/helloworld/",
type: "post",
dataType: "json",
context: document.body,
data: {val:'$(this).value'}
}).done(function(data) {
alert(data.name);
});

 

Java :-

class outer {

class inner extends JiraWebActionSupport {

@Path("/key")

@POST

@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})

public string get()

{

}

}

 

Plugin Information :-

group-id

com.example.plugins.tutorial

artifact-id

tutorial-jira-add-content-to-view-issue-screen

version

1.0-SNAPSHOT

package

com.example.plugins.tutorial

1 answer

0 votes
DH November 27, 2021

Your URL, http://localhost:2990/jira/rest/helloworld/, does not exist.

Suggest an answer

Log in or Sign up to answer