Project

General

Profile

Revision a35739ed

IDa35739edb51e34694c5d8650aa60aa4229bba907
Parent eb6e490d
Child cb6cf89d

Added by Katja Luther almost 2 years ago

ref #5783: rename demo 1

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java
61 61
    private final static String NAME_PRODUCTION = "cybertaxonomy.org";
62 62
    private final static String SERVER_PRODUCTION = "api.cybertaxonomy.org";
63 63

  
64
    private final static String NAME_DEMO_1 = "edit-WS I";
64
    private final static String NAME_DEMO_1 = "demo I";
65 65
    private final static String SERVER_DEMO_1 = "160.45.63.230";
66 66

  
67 67
    public final static String SERVER_LOCALHOST = "localhost";
......
146 146
    }
147 147

  
148 148
    public void updateInfo() throws CDMServerException {
149
        String url = "http://" + server + ":" + String.valueOf(port) + "/" + prefix + "info.jsp";
149
        String url ;
150
        if (this.isLocalhost()){
151
            url = "http://localhost:58080/cdmserver/" + "info.jsp";
152
        }else{
153
            url = "http://" + server + ":" + String.valueOf(port) + "/" + prefix + "info.jsp";
154
        }
150 155
        String responseBody = getResponse(url);
151 156
        if(responseBody != null) {
152 157
            try {
......
161 166

  
162 167
    public void addInstancesViaHttp() throws CDMServerException {
163 168
        updateInfo();
164
        String url = "http://" + server + ":" + String.valueOf(port) + "/" + prefix + "instances.jsp";
169
        String url;
170
        if (this.isLocalhost()){
171
            url = "http://localhost:58080" + "instances.jsp";
172
        }else{
173
            url = "http://" + server + ":" + String.valueOf(port) + "/" + prefix + "instances.jsp";
174
        }
165 175
        String responseBody = getResponse(url);
166 176
        if(responseBody != null) {
167 177
            try {
......
188 198

  
189 199
    private String getResponse(String url) throws CDMServerException {
190 200
        HttpClient client = new DefaultHttpClient();
201
       // client = HttpClientBuilder.create().build();
202
       // client.getParams();
191 203
        HttpParams params = client.getParams();
192 204

  
193 205
        HttpConnectionParams.setConnectionTimeout(params, 5000);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)