comparison flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java @ 1425:bc06a671ef60

Removed the URL parameter from service calls. The service implementations read the URL from the web.xml config file now. flys-client/trunk@3367 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 08 Dec 2011 09:12:27 +0000
parents ab8eb2f544f2
children 45cd2364adad
comparison
equal deleted inserted replaced
1424:8974e220b193 1425:bc06a671ef60
37 logger.info("ChartOutputServiceImpl.doGet"); 37 logger.info("ChartOutputServiceImpl.doGet");
38 38
39 try { 39 try {
40 OutputStream out = resp.getOutputStream(); 40 OutputStream out = resp.getOutputStream();
41 41
42 String serverUrl = req.getParameter("server"); 42 String url = getServletContext().getInitParameter("server-url");
43
43 String uuid = req.getParameter("uuid"); 44 String uuid = req.getParameter("uuid");
44 String type = req.getParameter("type"); 45 String type = req.getParameter("type");
45 String locale = req.getParameter("locale"); 46 String locale = req.getParameter("locale");
46 47
47 prepareHeader(req, resp); 48 prepareHeader(req, resp);
48 49
49 Document request = ClientProtocolUtils.newOutCollectionDocument( 50 Document request = ClientProtocolUtils.newOutCollectionDocument(
50 uuid, type, type, 51 uuid, type, type,
51 ChartServiceHelper.getChartAttributes(prepareChartAttributes(req))); 52 ChartServiceHelper.getChartAttributes(prepareChartAttributes(req)));
52 53
53 HttpClient client = new HttpClientImpl(serverUrl, locale); 54 HttpClient client = new HttpClientImpl(url, locale);
54 client.collectionOut(request, uuid, "chart", out); 55 client.collectionOut(request, uuid, "chart", out);
55 56
56 out.close(); 57 out.close();
57 out.flush(); 58 out.flush();
58 } 59 }

http://dive4elements.wald.intevation.org