public static String registerComponent(String componentName, String password, String partitionName) {
        System.getProperties().put("proxySet", "true");
        System.getProperties().put("proxyHost", "www-proxy.cs.tcd.ie");
        System.getProperties().put("proxyPort", "8080");
        String output = "";
        String line = "";
        try {
            // Construct data
            String query = URLEncoder.encode("componentName", "UTF-8") + "=" + URLEncoder.encode(componentName, "UTF-8");
            query += "&" + URLEncoder.encode("password", "UTF-8") + "=" + URLEncoder.encode(password, "UTF-8");
            if (!partitionName.equals("") && !partitionName.equals(null)) {
                query += "&" + URLEncoder.encode("partitionName", "UTF-8") + "=" + URLEncoder.encode(partitionName, "UTF-8");
            }
            // Send data
            URL url = new URL("http://kdeg-vm-24.scss.tcd.ie/globicLog/register/");
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
            wr.write(query);
            wr.flush();

            // Get the response
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            while ((line = rd.readLine()) != null) {
                output = output + line;
            }
            wr.close();
            rd.close();
        } catch (IOException e) {
        }
        return output;
    }