BAEL-102 - Spring with JSON-P
This commit is contained in:
parent
a9b95d326b
commit
1972b45a5b
|
@ -1,3 +1,5 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -45,26 +47,20 @@
|
|||
});
|
||||
});
|
||||
|
||||
function getCompanyData(data) {
|
||||
document.write("<b>ID:</b> "+data.id+"<br/>");
|
||||
document.write("<b>NAME:</b> "+data.name+"<br/>");
|
||||
document.write("<br/>");
|
||||
function getCompanyData(data) {
|
||||
$("#response").append("<b>ID:</b> "+data.id+"<br/>");
|
||||
$("#response").append("<b>NAME:</b> "+data.name+"<br/>");
|
||||
$("#response").append("<br/>");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Using REST URL-->
|
||||
<button id="REST-button">Test REST JSON-P!</button>
|
||||
<div id="infoREST"></div>
|
||||
|
||||
<!--Using @ResponseBody -->
|
||||
<button id="ResponseBody-button">Test ResponseBody JSON-P!</button>
|
||||
<div id="infoResponseBody"></div>
|
||||
|
||||
<!--Using ResponseEntity -->
|
||||
<button id="ResponseEntity-button">Test ResponseEntity JSON-P!</button>
|
||||
<div id="ResponseEntity"></div>
|
||||
<button id="ResponseBody-button">Send AJAX JSON-P request!</button>
|
||||
|
||||
<div id="response"></div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue