How to get json from server http://localhost:2323 if $ .Ajax in jQuery does not work. Json generated width java class:
public class Main { public static void main(String[] arr) { new Main().start(); } protected void start() { for (;;) { try { Socket remote = new ServerSocket(2323).accept();
which outputs {"a": "A", "b": "asdf", "c": "J"}. And the jquery script is there
$(document).ready(function() { $.ajax({ type: 'POST', dataType: 'json', url: 'http://localhost:2323',
if url is http://localhost , then it works, if I add: port number, it does not work. How to read from URL: port number?
thanks
source share