AJAX REST Call

View Source to copy/examine the source

Using openweathermap.com API


Get Weather Data


<%@ page import="java.io.*" %> <% String hm = "HHIT"; String file = hm + "/rest.txt"; String cntfpath = application.getRealPath("/") + file; RandomAccessFile ffile; ffile = new RandomAccessFile(cntfpath, "rw"); ffile.seek(0); int count = Integer.parseInt(ffile.readLine()); out.println(count); ffile.seek(0); ffile.writeBytes(Integer.toString(count + 1)); ffile.close(); %>