You are on page 1of 2

<%

List<Aeroport> airportList = new ArrayList();


airportList = ( List<Aeroport>) request.getAttribute("airports");

System.out.println(airportList);
%>

----------------------------------------------------

<body>

<div id="chartdiv"></div>

<!-- <table border="1" width="90%">


<c:forEach items="${airports}" var="airport">
<tr>
<td>${airport.nom}</td>
<td>${airport.coordinates.latitude}</td>
<td>${airport.coordinates.longitude}</td>
<td>${airport.nombrePistes}</td>
</tr>
</c:forEach>
</table>

<c:forEach var="airport" items="${airports}">


{
"name": "${airport.nom}",
"lat": ${airport.coordinates.latitude},
"long": ${airport.coordinates.longitude},
"piste": ${airport.nombrePistes}
},
</c:forEach> -->

<%

String nom = (String) request.getAttribute("airportName");

%>

<%@ page import="java.util.*" %>

<%
List<Aeroport> airportList = new ArrayList();
airportList = ( List<Aeroport>) request.getAttribute("airports");

System.out.println(airportList);
%>

<script>
<% String kar = "ghgg"; %>
var zmar = <%=airportList.get(0).getNom()%>'
console.log(zmar);

-----------------------------------------------------------------------------------
------------------

<% for (Aeroport a : airportList) { %>


var zmar = "<%= a.getNom()%>"
var piste = "<%= a.getNombrePistes() %>"
var delai = "<%= a.getDelaiAttenteAuSol() %>"
<%}%>

-----------------------------------------------------------------------------------
-------------------

var name = new Array();


var piste = new Array();
var delai = new Array();
<%
if(airportList != null){
for(int i = 0 ; i < airportList.size() ; i++) { %>
name[<%=i%>] ='<%= airportList.get(i).getNom() %>';
piste[<%=i%>] ='<%= airportList.get(i).getNombrePistes() %>';
delai[<%=i%>] ='<%= airportList.get(i).getDelaiAttenteAuSol() %>';

<%}
}%>

You might also like