13 |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
14 |
import javax.servlet.http.HttpServletResponse; |
import javax.servlet.http.HttpServletResponse; |
15 |
|
|
16 |
|
import dk.thoerup.genericjavautils.HttpUtil; |
17 |
|
import dk.thoerup.traininfoservice.db.DBConnection; |
18 |
|
|
19 |
@Deprecated |
@Deprecated |
20 |
@WebServlet(urlPatterns={"/LoadStations"}) |
@WebServlet(urlPatterns={"/LoadStations"}) |
21 |
|
|
56 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
57 |
String url = "http://rafiki.t-hoerup.dk/tog/stations.php"; |
String url = "http://rafiki.t-hoerup.dk/tog/stations.php"; |
58 |
|
|
59 |
String stationStr = DownloadUtil.getContentString(url, 5000, "ISO-8859-1"); |
String stationStr = HttpUtil.getContentString(url, 5000, "ISO-8859-1"); |
60 |
|
|
61 |
String stations[] = stationStr.split("\n"); |
String stations[] = stationStr.split("\n"); |
62 |
Connection conn = null; |
Connection conn = null; |