Using GIS-Jonathan's hint I solved my problem,I could install the oracle extension.
I had accidentally installed the MySQL plugin jar's into the [Geoserver installation directory]\lib directory first.
Then when I added them to the correct directory, but not yet removed them from the upper lib, it still did not work.
I suspect if you added -verbose onto the java start up command you'll find that another mysql jodbc is being loaded first before the one in the WEB-INF\lib.
You will have to adjust your environment path variable to have the plugin jar to be first, or the only jar available.
When I deleted the files that I had added to [Geoserver installation directory]\lib it started working.
I think that maybe you might have not restarted geoserver service after installing into the WEB-INF\lib directory, and when you added them into the other places it "broke" your install
Here is a script to turn your csv into a keyed object as suggested in the comments:
function csvJSON(csv){
var lines=csv.split("\n");
var result = {};
var headers=lines[0].split(",");
// start at 1 to skip the header row
for(var i=1;i<lines.length;i++){
var obj = {};
var currentline=lines[i].split(",");
var key = currentline[0];
// start at 1 to skip the first column, which is your key
for(var j=1;j<headers.length;j++){
obj[headers[j]] = currentline[j];
}
result[key] = obj;
}
// return a js object
return result;
}
// read your csv; will likely need a way to get this from a file in your application; just for demonstration here:
var csv = "name,detail1,detail2,detail3,detail4,detail5\nWard 01,23,45,10,54,30\nWard 02,78,98,14,20,53"
// construct the lookup object from the csv
var csvLookup = csvJSON(csv);
With this in place, when constructing your popups you can do a simple lookup by key to get the value(s) of interest:
function onEachFeature(feature, layer) {
// lookup the value from the csv for this polygon feature
// assuming here key is in feature.properties.name = 'Ward01'
var ward = feature.properties.name; // or whatever it really is
var detail = csvLookup[ward]["detail1"];
layer.bindPopup("<p> Detail1 for " + ward + ": " + detail + "</p>");
}
Best Answer
If the data is not sensitive or private in nature and does not violate any organizational data policies it is possible to host GeoJSON on GitHub. See documentation. Simply commit the file as you would normally using a
.geojson
extension then use the URL for the GeoJSON in your application. eg.https://github.com/<username>/<project>/blob/master/<file>.geojson