-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrips.jsp
47 lines (39 loc) · 949 Bytes
/
trips.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<%@page import="java.util.*" %>
<%@page import="MyPack.*" %>
<jsp:useBean id="tripDAO" class = "MyPack.TripDAO" scope = "page"/>
<html>
<body>
<center>
<h2>Available Package Detail</h2>
<table border="1" >
<tr>
<th>Departure_Date</th>
<th>Departure_Time</th>
<th>Departure_From</th>
<th>No_of_Days</th>
<th>No_of_Seats</th>
<th>Price_Per_Seat</th>
</tr>
<%
TripDAO trip = new TripDAO();
ArrayList tripList = trip.retrieveTripList();
%>
<%
TripBean trBean = null;
// iterating over ArrayList to display trip details
for(int i=0; i<tripList.size(); i++){
trBean = (TripBean)tripList.get(i);
%>
<tr>
<td> <%= trBean.getDeparture_Date()%> </td>
<td> <%= trBean.getDeparture_Time()%> </td>
<td> <%= trBean.getDeparture_From()%> </td>
<td> <%= trBean.getNo_of_Days()%> </td>
<td> <%= trBean.getNo_of_Seats()%> </td>
<td> <%= trBean.getPrice_Per_Seat()%> </td>
</tr>
<%
} // end for
%>
</table></center>
</body></html>