java - Jquery AJAX Result data retrieve back to client side in velocity template -


i have created ajax request in velocity template , able request @ .java file below: (java file extended "jirawebactionsupport" webwork module).

var url = "planissuesaction!issuesplanning.jspa"; jquery.post(url,myjsonobject,function(result) {     alert('success'); }) .done(function() { alert("in done"); }) .fail(function() { alert("error"); }) .always(function() { alert("finished"); }); 

on server side, in doissuesplanning method, able call , insert posted data.

 public string doissuesplanning() {      system.out.println("success executed result appear"); //i want value //retrieval @ client side it's not working. unable receive @ ajax response.   return getredirect("planissuesaction!default.jspa"); 

//return "result success" //also tried instead of getredirect ,used direct response //return not worked, capture @ error in ajax response @ client side. }

now need return result data client side @ jquery "result" parameter.

how can achieve this? currently, in "result" object shows html text , nothing else. (i have set object above through - "system.out.println , expect retrieved @ client side not working).

can please let me know , wrong here.

thank you.

webwork jspa urls return html since purpose. ajax calls rest resource returns json. i'd define new rest resource this. more information @ https://developer.atlassian.com/display/docs/developing+a+rest+service+plugin


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -