# HG changeset patch # User Ingo Weinzierl # Date 1319550065 0 # Node ID 9085cffbb7c4edc1cf74bbaef41b27a54b0008e0 # Parent 1fae113b93fd1010fce339395e4ce9a255c36297 Made the URL of Artifact server available via ServletContext parameter. flys-client/trunk@3075 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/ChangeLog Tue Oct 25 13:41:05 2011 +0000 @@ -1,3 +1,17 @@ +2011-10-25 Ingo Weinzierl + + * src/main/webapp/WEB-INF/web.xml: Added a context parameter that might be + used to determine the URL of the Artifact server. + + * src/main/java/de/intevation/flys/client/client/services/MapOutputServiceAsync.java, + src/main/java/de/intevation/flys/client/client/services/MapOutputService.java, + src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java: + Removed the URL parameter from doOut(). This parameter is fetched from + ServletContext. + + * src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java: + Modified the call of MapOutputService.doOut(). + 2011-10-25 Raimund Renkert Issue 118/203 diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputService.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputService.java Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputService.java Tue Oct 25 13:41:05 2011 +0000 @@ -16,6 +16,6 @@ @RemoteServiceRelativePath("map") public interface MapOutputService extends RemoteService { - void doOut(Collection collection, String serverUrl) throws ServerException; + void doOut(Collection collection) throws ServerException; } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputServiceAsync.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputServiceAsync.java Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/MapOutputServiceAsync.java Tue Oct 25 13:41:05 2011 +0000 @@ -10,9 +10,6 @@ */ public interface MapOutputServiceAsync { - public void doOut( - Collection collection, - String serverUrl, - AsyncCallback callback); + public void doOut(Collection collection, AsyncCallback callback); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Tue Oct 25 13:41:05 2011 +0000 @@ -84,8 +84,7 @@ floodMap = new FloodMap(getSrid(), getMaxExtent()); - mapService.doOut(collection, "http://localhost:8181", - new AsyncCallback() { + mapService.doOut(collection, new AsyncCallback() { public void onFailure(Throwable caught) { GWT.log("MAP ERROR: " + caught.getMessage()); } diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java Tue Oct 25 13:41:05 2011 +0000 @@ -31,20 +31,19 @@ Logger.getLogger(MapOutputServiceImpl.class); - public void doOut(Collection collection, String serverUrl) + public void doOut(Collection collection) throws ServerException { - String url = (String) getServletContext().getAttribute("server-url"); - logger.info("MapOutputServiceImpl.doOut"); + String url = getServletContext().getInitParameter("server-url"); String uuid = collection.identifier(); try { Document request = ClientProtocolUtils.newOutCollectionDocument( uuid, "floodmap", "floodmap"); - HttpClient client = new HttpClientImpl(serverUrl); + HttpClient client = new HttpClientImpl(url); InputStream is = client.collectionOut(request, uuid, "floodmap"); Document response = XMLUtils.parseDocument(is); diff -r 1fae113b93fd -r 9085cffbb7c4 flys-client/src/main/webapp/WEB-INF/web.xml --- a/flys-client/src/main/webapp/WEB-INF/web.xml Tue Oct 25 13:32:16 2011 +0000 +++ b/flys-client/src/main/webapp/WEB-INF/web.xml Tue Oct 25 13:41:05 2011 +0000 @@ -4,6 +4,11 @@ "http://java.sun.com/dtd/web-app_2_3.dtd"> + + + server-url + http://localhost:8181 + @@ -184,16 +189,16 @@ de.intevation.flys.client.server.ChartOutputServiceImpl + + MapOutputService + de.intevation.flys.client.server.MapOutputServiceImpl + + MapOutputService /flys/map - - MapOutputService - de.intevation.flys.client.server.MapOutputServiceImpl - - ChartOutputService /flys/chart