Index: src/main/webapp/WEB-INF/web.xml
===================================================================
--- src/main/webapp/WEB-INF/web.xml	(revision 43)
+++ src/main/webapp/WEB-INF/web.xml	(revision 1)
@@ -6,41 +6,24 @@
 	<display-name>Domains and Profiles server</display-name>
 
-	<filter>
-		<filter-name>CorsFilter</filter-name>
-		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
-		<init-param>
-			<param-name>cors.allowed.origins</param-name>
-			<param-value>*</param-value>
-		</init-param>
-		<init-param>
-			<param-name>cors.exposed.headers</param-name>
-			<param-value>Access-Control-Allow-Origin</param-value>
-		</init-param>
-	</filter>
-	<filter-mapping>
-		<filter-name>CorsFilter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
+<servlet>
+    <!-- List files in /ws-definitions -->
+    <servlet-name>listrepo</servlet-name>
+    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+    <init-param>
+        <param-name>debug</param-name>
+        <param-value>0</param-value>
+    </init-param>
+    <init-param>
+        <param-name>listings</param-name>
+        <param-value>true</param-value>
+    </init-param>
+    <load-on-startup>100</load-on-startup>
+</servlet>
 
-	<servlet>
-		<!-- List files in /ws-definitions -->
-		<servlet-name>listrepo</servlet-name>
-		<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
-		<init-param>
-			<param-name>debug</param-name>
-			<param-value>0</param-value>
-		</init-param>
-		<init-param>
-			<param-name>listings</param-name>
-			<param-value>true</param-value>
-		</init-param>
-		<load-on-startup>100</load-on-startup>
-	</servlet>
-
-	<servlet-mapping>
-		<servlet-name>listrepo</servlet-name>
-		<url-pattern>/domainsrepo/*</url-pattern>
-	</servlet-mapping>
-
+<servlet-mapping>
+    <servlet-name>listrepo</servlet-name>
+    <url-pattern>/domainsrepo/*</url-pattern>
+</servlet-mapping>
+    
 </web-app>
 
Index: src/main/webapp/domainsrepo/7issues/7issues.json
===================================================================
--- src/main/webapp/domainsrepo/7issues/7issues.json	(revision 43)
+++ src/main/webapp/domainsrepo/7issues/7issues.json	(revision 1)
@@ -3,23 +3,23 @@
 	"issuesValues": {
 		"i1": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i2": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i3": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i4": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i5": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i6": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		},
 		"i7": {
-			"range": {"low":0,"high":9,"step":1} 
+			"range": ["0", "9", "1"]
 		}
 	}
Index: src/main/webapp/domainsrepo/7issues/7issues1.json
===================================================================
--- src/main/webapp/domainsrepo/7issues/7issues1.json	(revision 43)
+++ src/main/webapp/domainsrepo/7issues/7issues1.json	(revision 1)
@@ -4,57 +4,64 @@
 		"issueUtilities": {
 			"i1": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.11,
 					"highValue": 9,
 					"highUtility": 0.99
+
 				}
 			},
 			"i2": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.12,
 					"highValue": 9,
 					"highUtility": 0.97
+
 				}
 			},
 			"i3": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.13,
 					"highValue": 9,
 					"highUtility": 0.96
+
 				}
 			},
 			"i4": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.14,
 					"highValue": 9,
 					"highUtility": 0.94
+
 				}
 			},
 			"i5": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.15,
 					"highValue": 9,
 					"highUtility": 0.93
+
 				}
 			},
 			"i6": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.16,
 					"highValue": 9,
 					"highUtility": 0.92
+
 				}
 			},
 			"i7": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.16,
 					"highValue": 9,
 					"highUtility": 0.91
+
 				}
 			}
@@ -73,23 +80,23 @@
 			"issuesValues": {
 				"i1": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i2": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i3": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i4": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i5": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i6": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i7": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				}
 			}
Index: src/main/webapp/domainsrepo/7issues/7issues2.json
===================================================================
--- src/main/webapp/domainsrepo/7issues/7issues2.json	(revision 43)
+++ src/main/webapp/domainsrepo/7issues/7issues2.json	(revision 1)
@@ -4,68 +4,75 @@
 		"issueUtilities": {
 			"i1": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.51,
 					"highValue": 9,
 					"highUtility": 0.11
+
 				}
 			},
 			"i2": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.92,
 					"highValue": 9,
 					"highUtility": 0.21
+
 				}
 			},
 			"i3": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.93,
 					"highValue": 9,
 					"highUtility": 0.13
+
 				}
 			},
 			"i4": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.94,
 					"highValue": 9,
 					"highUtility": 0.14
+
 				}
 			},
 			"i5": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.95,
 					"highValue": 9,
 					"highUtility": 0.15
+
 				}
 			},
 			"i6": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.96,
 					"highValue": 9,
 					"highUtility": 0.16
+
 				}
 			},
 			"i7": {
-				"NumberValueSetUtilities": {
+				"numberutils": {
 					"lowValue": 0,
 					"lowUtility": 0.97,
 					"highValue": 9,
 					"highUtility": 0.17
+
 				}
 			}
 		},
 		"issueWeights": {
-			"i1": 0.24746,
-			"i2": 0.118241,
-			"i3": 0.186047,
-			"i4": 0.206295,
-			"i5": 0.161126,
+			"i1": 0.24745759773026107,
+			"i2": 0.11824193959921694,
+			"i3": 0.1860471425098606,
+			"i4": 0.20629555826677742,
+			"i5": 0.16112666189388397,
 			"i6": 0.0538874,
-			"i7": 0.0269436
+			"i7": 0.0269437
 		},
 		"domain": {
@@ -73,23 +80,23 @@
 			"issuesValues": {
 				"i1": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i2": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i3": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i4": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i5": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i6": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				},
 				"i7": {
-					"range": {"low":0,"high":9,"step":1} 
+					"range": ["0", "9", "1"]
 				}
 			}
Index: src/main/webapp/domainsrepo/jobs/jobs1.json
===================================================================
--- src/main/webapp/domainsrepo/jobs/jobs1.json	(revision 43)
+++ src/main/webapp/domainsrepo/jobs/jobs1.json	(revision 1)
@@ -3,5 +3,5 @@
 		"issueUtilities": {
 			"salary": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"2000": 0,
@@ -14,5 +14,5 @@
 			},
 			"fte": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"0.6": 0.25,
@@ -23,5 +23,5 @@
 			},
 			"work from home": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"0": 0.333333333,
@@ -32,5 +32,5 @@
 			},
 			"lease car": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"yes": 1,
@@ -40,5 +40,5 @@
 			},
 			"permanent contract": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"yes": 1,
@@ -48,5 +48,5 @@
 			},
 			"career development opportunities": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"low": 0,
@@ -115,9 +115,9 @@
 		"reservationBid": {
 			"issuevalues": {
-				"salary": "3500",
+				"salary": "300",
 				"fte": "0.8",
-				"work from home": "1",
+				"work from home": "0",
 				"lease car": "no",
-				"permanent contract": "yes",
+				"permanent contract": "no",
 				"career development opportunities": "medium"
 			}
Index: src/main/webapp/domainsrepo/jobs/jobs1_20.json
===================================================================
--- src/main/webapp/domainsrepo/jobs/jobs1_20.json	(revision 43)
+++ 	(revision )
@@ -1,403 +1,0 @@
-{
-	"DefaultPartialOrdering": {
-		"name": "jobs1_20",
-		"domain": {
-			"name": "jobs",
-			"issuesValues": {
-				"lease car": {
-					"values": ["yes", "no"]
-				},
-				"permanent contract": {
-					"values": ["yes", "no"]
-				},
-				"career development opportunities": {
-					"values": ["low", "medium", "high"]
-				},
-				"fte": {
-					"values": ["0.6", "0.8", "1.0"]
-				},
-				"salary": {
-					"values": ["2000", "2500", "3000", "3500", "4000"]
-				},
-				"work from home": {
-					"values": ["0", "1", "2"]
-				}
-			}
-		},
-		"better": [
-			[0, 34],
-			[2, 9],
-			[3, 5],
-			[6, 23],
-			[12, 18],
-			[13, 27],
-			[14, 28],
-			[15, 37],
-			[17, 28],
-			[19, 1],
-			[20, 29],
-			[21, 24],
-			[22, 8],
-			[25, 10],
-			[26, 16],
-			[30, 24],
-			[31, 32],
-			[33, 7],
-			[35, 4],
-			[36, 11]
-		],
-		"bids": [{
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "4000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "2000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "2000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.8",
-				"salary": "2500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.6",
-				"salary": "2000",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "2500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "1.0",
-				"salary": "3500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "medium",
-				"fte": "1.0",
-				"salary": "3000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "3500",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.6",
-				"salary": "2000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "2000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "3500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "2500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "3000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.8",
-				"salary": "2000",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "1.0",
-				"salary": "3500",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "4000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "3000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.8",
-				"salary": "2000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "1.0",
-				"salary": "3000",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "1.0",
-				"salary": "4000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "1.0",
-				"salary": "3500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "medium",
-				"fte": "1.0",
-				"salary": "2500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "1.0",
-				"salary": "3000",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "3000",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "2000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "3500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.6",
-				"salary": "4000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "0.6",
-				"salary": "2000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "0.6",
-				"salary": "3500",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "0.8",
-				"salary": "4000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "4000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "high",
-				"fte": "0.8",
-				"salary": "2500",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "yes",
-				"career development opportunities": "medium",
-				"fte": "1.0",
-				"salary": "4000",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "0.6",
-				"salary": "2500",
-				"work from home": "2"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "yes",
-				"career development opportunities": "low",
-				"fte": "0.8",
-				"salary": "3500",
-				"work from home": "0"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "high",
-				"fte": "1.0",
-				"salary": "4000",
-				"work from home": "1"
-			}
-		}, {
-			"issuevalues": {
-				"lease car": "yes",
-				"permanent contract": "no",
-				"career development opportunities": "medium",
-				"fte": "0.8",
-				"salary": "3500",
-				"work from home": "2"
-			}
-		}],
-		"reservationBid": {
-			"issuevalues": {
-				"lease car": "no",
-				"permanent contract": "no",
-				"career development opportunities": "low",
-				"fte": "0.6",
-				"salary": "3500",
-				"work from home": "1"
-			}
-		}
-	}
-}
Index: src/main/webapp/domainsrepo/jobs/jobs2.json
===================================================================
--- src/main/webapp/domainsrepo/jobs/jobs2.json	(revision 43)
+++ src/main/webapp/domainsrepo/jobs/jobs2.json	(revision 1)
@@ -3,5 +3,5 @@
 		"issueUtilities": {
 			"salary": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"2000": 1.0,
@@ -14,5 +14,5 @@
 			},
 			"fte": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"0.6": 0.363636363636363636,
@@ -23,5 +23,5 @@
 			},
 			"work from home": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"0": 1.0,
@@ -32,5 +32,5 @@
 			},
 			"lease car": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"yes": 0,
@@ -40,5 +40,5 @@
 			},
 			"permanent contract": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"yes": 0.23809523809523808,
@@ -48,5 +48,5 @@
 			},
 			"career development opportunities": {
-				"DiscreteValueSetUtilities": {
+				"discreteutils": {
 					"valueUtilities": {
 						"low": 1.0,
@@ -115,5 +115,5 @@
 		"reservationBid": {
 			"issuevalues": {
-				"salary": "3000",
+				"salary": "300",
 				"fte": "0.8",
 				"work from home": "0",
Index: src/main/webapp/index.jsp
===================================================================
--- src/main/webapp/index.jsp	(revision 43)
+++ src/main/webapp/index.jsp	(revision 1)
@@ -1,8 +1,3 @@
 <html>
-<head>
-<title>profiles server</title>
-<link rel="stylesheet" type="text/css" href="css/list.css" />
-
-</head>
 <body>
 	<h1>GeniusWeb Domains and Profiles Server.</h1>
@@ -15,14 +10,62 @@
 		</h1>
 
-		The list of currently available profiles is <aa 
-			onclick="window.location='list.xhtml'+window.location.search;">here</aa>.<br>
-		The list of domain and profile files is browsable <a
-			href="domainsrepo">here</a>. Notice that these may contain files with
-		errors, and thus are not available for use.
-		<p>
-			For creating a profile or adding it to the server please check the <a
-				href="https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebProfilesServer">wiki</a>.
+		The list of currently available profiles is <a
+			href="websocket/list.xhtml">here</a>.<br> The list of domain and
+		profile files is browsable <a href="domainsrepo">here</a>. Notice that
+		these may contain files with errors, and thus are not available for
+		use.
 
-		
+		<h2>
+			Adding domains and profiles
+			</h1>
+			You can add and remove domains and profiles by dragging your .json
+			files into and out of the repo directory.
+
+			<h2>
+				Access
+				</h1>
+				Your agent has JSON based access to the repo through websockets. Two
+				examples are provided, one based on javax.websocket and one on
+				neovisionaries websocket
+
+
+				<h3>Example with javax websocket</h3>
+				The example code is available 
+				<a
+					href="https://tracinsy.ewi.tudelft.nl/trac/Genius2ProfilesServer/browser/src/test/java/geniusweb/examples/DownloadProfileExample.java">here</a>
+and also is part of the JavaClientTest junit test in this project (run with <code>mvn test</code>)
+				To compile that example you need the javax websocket
+				dependency in your pom:
+				<code>
+					<pre>					
+&lt;dependency>
+	&lt;groupId>javax.websocket&lt;/groupId>
+	&lt;artifactId>javax.websocket-api&lt;/artifactId>
+	&lt;version>1.1&lt;/version>
+&lt;/dependency>
+
+				
+				</code>
+				</pre>
+
+
+				<h3>Example with neovisionaries websocket</h3>
+				The example code is available 
+				<a
+					href="https://tracinsy.ewi.tudelft.nl/trac/Genius2ProfilesServer/browser/src/test/java/geniusweb/examples/DownloadProfileExample.java">here</a>
+and also is part of the JavaClientTest junit test in this project (run with <code>mvn test</code>)
+				To compile that example you need the neovisionaries websocket
+				dependency in your pom:
+				<code>
+					<pre>					
+&lt;dependency>
+	&lt;groupId>com.neovisionaries&lt;/groupId>
+	&lt;artifactId>nv-websocket-client&lt;/artifactId>
+	&lt;version>2.6&lt;/version>
+&lt;/dependency>
+
+				
+				</code>
+				</pre>
 </body>
 </html>
Index: src/main/webapp/list.xhtml
===================================================================
--- src/main/webapp/list.xhtml	(revision 43)
+++ 	(revision )
@@ -1,98 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>Profiles and Domains list</title>
-<link rel="stylesheet" type="text/css" href="css/list.css" />
-
-</head>
-<body>
-	<div class="noscript">
-		<h2 style="color: #ff0000">Seems your browser doesn't support
-			Javascript! Websockets rely on Javascript being enabled. Please
-			enable Javascript and reload this page!</h2>
-	</div>
-	<div>
-		<table id="domainsTable" class="domainsTable">
-			<tr>
-				<th>Domain</th>
-				<th>Available Profiles</th>
-			</tr>
-			<tr>
-				<td>-</td>
-				<td>-</td>
-			</tr>
-		</table>
-
-	</div>
-</body>
-
-<!-- Script to get/update the list and put it into the table. -->
-<script type="application/javascript">
-	
-	<![CDATA[
-        "use strict";
-
-        var ws = null;
-
-        function connect() {
-        	// manually construct relative path.......
-            var target = 'ws://'+location.host+"/"+location.pathname.split("/")[1]+'/websocket/liststream'+window.location.search;
-            if ('WebSocket' in window) {
-                ws = new WebSocket(target);
-            } else if ('MozWebSocket' in window) {
-                ws = new MozWebSocket(target);
-            } else {
-                alert('WebSocket is not supported by this browser. Please use a newer browser');
-                return;
-            }
-            ws.onopen = function () {
-            	// whatever.
-            };
-            ws.onmessage = function (event) {
-            	update(JSON.parse(event.data));
-            };
-            ws.onclose = function (event) {
-                alert('Info: Server closed connection. Code: ' + event.code + (event.reason == "" ? "" : ", Reason: " + event.reason));
-            };
-        }
-
-        /*
-        @param domains a map of the form {"jobs":["jobs1","jobs2"]}
-        where the keys are the names of the available domains nd the values a list of the available profiles in that domain.
-        */
-        function update(domains) {
-        	//alert("update!");
-        	//log(JSON.stringify(domains))
-        	
-        	// Find a <table> element with id="myTable":
-			var table = document.getElementById("domainsTable");
-        	var oldtablerows=document.querySelectorAll("#domainsTable tr:not(:first-child)");
-            for (var i = 0; i < oldtablerows.length; i++) {
-            	oldtablerows[i].parentNode.removeChild(oldtablerows[i]);
-            }
-        	for (var domainname in domains) {
-        		var row = table.insertRow(-1);
-        		row.insertCell(0).innerHTML = domainname;
-        		row.insertCell(1).innerHTML = domains[domainname];
-        	}
-        	
-        }
-        
-        /*
-        This is called when the window DOM is loaded. window.onload runs BEFORE the window is loaded
-        and therefore is too early to remove the noscript message.
-        */
-       document.addEventListener("DOMContentLoaded", function() {
-             // Remove elements with "noscript" class - <noscript> is not allowed in XHTML
-             var noscripts = document.getElementsByClassName("noscript");
-             for (var i = 0; i < noscripts.length; i++) {
-                 noscripts[i].parentNode.removeChild(noscripts[i]);
-             }
-         	connect();
-
-         }, false);
-    ]]>
-
-</script>
-
-</html>
Index: src/main/webapp/websocket/css/list.css
===================================================================
--- src/main/webapp/websocket/css/list.css	(revision 1)
+++ src/main/webapp/websocket/css/list.css	(revision 1)
@@ -0,0 +1,14 @@
+
+th {
+	padding: 15px;
+}
+
+#domainsTable {
+	width: 100%;
+	border: 1px solid black;
+	border-collapse:collapse;
+	font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
+}
+
+tr:nth-child(even) {background: #DDD}
+tr:nth-child(odd) {background: #FFF}
Index: src/main/webapp/websocket/list.xhtml
===================================================================
--- src/main/webapp/websocket/list.xhtml	(revision 1)
+++ src/main/webapp/websocket/list.xhtml	(revision 1)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<title>Profiles and Domains list</title>
+<link rel="stylesheet" type="text/css" href="css/list.css" />
+
+</head>
+<body>
+	<div class="noscript">
+		<h2 style="color: #ff0000">Seems your browser doesn't support
+			Javascript! Websockets rely on Javascript being enabled. Please
+			enable Javascript and reload this page!</h2>
+	</div>
+	<div>
+		<table id="domainsTable" class="domainsTable">
+			<tr>
+				<th>Domain</th>
+				<th>Available Profiles</th>
+			</tr>
+			<tr>
+				<td>-</td>
+				<td>-</td>
+			</tr>
+		</table>
+
+	</div>
+</body>
+
+<!-- Script to get/update the list and put it into the table. -->
+<script type="application/javascript">
+	
+	<![CDATA[
+        "use strict";
+
+        var ws = null;
+
+        function connect() {
+        	// manually construct relative path.......
+            var target = 'ws://'+location.host+"/"+location.pathname.split("/")[1]+'/websocket/liststream';
+            if ('WebSocket' in window) {
+                ws = new WebSocket(target);
+            } else if ('MozWebSocket' in window) {
+                ws = new MozWebSocket(target);
+            } else {
+                alert('WebSocket is not supported by this browser. Please use a newer browser');
+                return;
+            }
+            ws.onopen = function () {
+            	// whatever.
+            };
+            ws.onmessage = function (event) {
+            	update(JSON.parse(event.data));
+            };
+            ws.onclose = function (event) {
+                alert('Info: Server closed connection. Code: ' + event.code + (event.reason == "" ? "" : ", Reason: " + event.reason));
+            };
+        }
+
+        /*
+        @param domains a map of the form {"jobs":["jobs1","jobs2"]}
+        where the keys are the names of the available domains nd the values a list of the available profiles in that domain.
+        */
+        function update(domains) {
+        	//alert("update!");
+        	//log(JSON.stringify(domains))
+        	
+        	// Find a <table> element with id="myTable":
+			var table = document.getElementById("domainsTable");
+        	var oldtablerows=document.querySelectorAll("#domainsTable tr:not(:first-child)");
+            for (var i = 0; i < oldtablerows.length; i++) {
+            	oldtablerows[i].parentNode.removeChild(oldtablerows[i]);
+            }
+        	for (var domainname in domains) {
+        		var row = table.insertRow(-1);
+        		row.insertCell(0).innerHTML = domainname;
+        		row.insertCell(1).innerHTML = domains[domainname];
+        	}
+        	
+        }
+        
+        /*
+        This is called when the window DOM is loaded. window.onload runs BEFORE the window is loaded
+        and therefore is too early to remove the noscript message.
+        */
+       document.addEventListener("DOMContentLoaded", function() {
+             // Remove elements with "noscript" class - <noscript> is not allowed in XHTML
+             var noscripts = document.getElementsByClassName("noscript");
+             for (var i = 0; i < noscripts.length; i++) {
+                 noscripts[i].parentNode.removeChild(noscripts[i]);
+             }
+         	connect();
+
+         }, false);
+    ]]>
+
+</script>
+
+</html>
