-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchCollection.jsp
More file actions
executable file
·49 lines (40 loc) · 1.46 KB
/
Copy pathsearchCollection.jsp
File metadata and controls
executable file
·49 lines (40 loc) · 1.46 KB
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
<jsp:include page="userDashboard.jsp" />
<%@ page import="MyPack.UserMovies" %>
<%@ page import="MyPack.UserInfo" %>
<% UserInfo user=(UserInfo) session.getAttribute("uInfo"); %>
<div style="text-align: center;">
<button class="btn btn-primary btn-lg text-white p-2 px-5 m-5"> Search a Movie Record</button>
</div>
<form class="mx-5 mt-5" style="margin-right:852px !important" action="ControllerServlet" method="post">
<div class="mb-3">
<label class="form-label">Movie Name</label>
<input class="form-control" type="text" name="mName">
</div>
<input type="text" hidden name="id" value="<%=user.getId()%>">
<button type="submit" value="searchMovieRecord" name="action" class="btn btn-primary">Submit</button>
</form>
<table class="table" style="margin-top:50px ;">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Movie Name</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<%@ page import="MyPack.UserMovies, java.util.ArrayList" %>
<%
ArrayList <UserMovies> movies= (ArrayList<UserMovies>)request.getAttribute("searchMovies");
if(movies!=null){
UserMovies movie = null;
for (int i=0;i<movies.size();i++){
movie = movies.get(i);
%>
<tr>
<th scope="row"><%= i+1 %></th>
<td><%= movie.getMname() %></td>
<td><%= movie.getDescription() %></td>
</tr>
<% } }%>
</tbody>
</table>