[ 세미프로젝트(http://iclasskh.iptime.org:9090/pictures/) 과정 ]
01. 메뉴바 Menubar
02. 메인화면 Main
04. 예매단계1 ReserveOne
05. 예매단계2 ReserveTwo
09. 마이페이지-예매/관람확인 MyPage-MiniView
10. 마이페이지/관리자페이지-예매상세확인 MyPage-Reserved/Admin-Reserved
1. Main 화면

2. 주요기능
-1) TopRank5 Movie 리스트 조회하여 슬라이드로 보여주기
-2) 위와 동일한 리스트 포스터로 모두 표현 -> 포스터 클릭 시, 영화 상세보기 연결
-3) 5개의 상영예정작 정보를 받아와서 마찬가지로 포스터로 표기 -> 포스터 클릭 시, 영화 상세보기 연결
# 필수 고려 사항
-. 만약 Rank 리스트의 갯수가 5개가 되지 않아 null 문제가 발생할 수 있는 상황
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="movie-posters"> | |
<% if(tmdPoster.size()>= 5){%> | |
<% for(int i=0; i<5; i++){ %> | |
<div class="movie-poster"> | |
<span class="rank"><%=(i+1)%>.</span> | |
<a href="<%=contextPath%>/movieDetail.mo?movieNo=<%=tmdPoster.get(i).getMovieNo()%>"> | |
<img src="<%=request.getContextPath()%>/resources/images/<%= tmdPoster.get(i).getModifyName() %>" | |
onerror="this.src='../../resources/images/noImageMain.jpg'" alt="" /> | |
</a> | |
</div> | |
<% } }else{ %> | |
<% for(int i=0; i<tmdPoster.size(); i++){ %> | |
<div class="movie-poster"> | |
<span class="rank"><%=(i+1)%>.</span> | |
<a href="<%=contextPath%>/movieDetail.mo?movieNo=<%=tmdPoster.get(i).getMovieNo()%>"> | |
<img src="<%= request.getContextPath() %>/resources/images/<%= tmdPoster.get(i).getModifyName() %>" | |
onerror="this.src='../../resources/images/noImageMain.jpg'" alt="" /> | |
</a> | |
</div> | |
<%} %> | |
<% for(int i=0; i < 5-tmdPoster.size(); i++){ %> | |
<div class="movie-poster"> | |
<a> | |
<img src="<%= request.getContextPath() %>/resources/images/<%= tmdPoster.get(i).getModifyName() %>" | |
onerror="this.src='../../resources/images/noImageMain.jpg'" alt="" /> | |
</a> | |
</div> | |
<% } %> | |
<%} %> | |
</div> |
3. 배운점
- nullPoint오류 필히 고려하기!
: 나는 예시데이터를 5개 이상으로 넣고 돌렸기에 발생하지 않던 문제가 다른 팀원이 실행했을 때 발생 - 충분히 고려하지 못했던 문제에 당황했고 오류의 원인을 찾던 중 list가 채워지지 않아 null 값이 실행되었음을 알게 됨 - 이후 null 값이 들어갈 수 있는 경우에 대해 충분히 고려해야함을 깨달음
'Project > KH.학원프로젝트' 카테고리의 다른 글
Semi-[Pictures.] 06. ReserveThree (0) | 2020.04.22 |
---|---|
Semi-[Pictures.] 05. ReserveTwo (0) | 2020.04.22 |
Semi-[Pictures.] 04. ReserveOne (0) | 2020.04.22 |
Semi-[Pictures.] 03. Theater (0) | 2020.04.22 |
Semi-[Pictures.] 01. Menubar (0) | 2020.04.21 |