In your controller class you can put the data in an array and send to your jsp :
request.setAttribute("mydata", mydataarray);
In your Electricity.jsp you can get parameters as :
var jsvarlist=<%=request.getAttribute("mydata") %>;
Note: javascript doesn't want explicit data types
In your JS file you can pass the list at your function , as it is an array you can get data in this way :
jsvarlist[0] //first value etc..
if you need to import such java class in your jsp , you should use :
<%@ page import ="yourpackage.yourclass" %>
In the end import the JS file to your jsp and call your function who accept the list now :
<script type="text/javascript" src="yourfile.js"></script>
... call your function