o bDao=new BookDao(); List booklist = bDao.findBooksforIndex(); for(int i=0;i Book b=(Book)booklist.get(i); if(i%2==0){ %> <%} %> <%=b.getTitle() %>[<%=b.getAuthor() %>] <%}%>