}
try {
DAOFactory df = DAOFactory.getInstance();
NotesDAO notesDAO = df.getDAO(Note.class, NotesDAO.class);
List<Note> notes = notesDAO.search(search, user.getUserId());
req.setAttribute("list", notes);
RequestDispatcher requestDispatcher = req.getRequestDispatcher(SEARCH_SERVLET + ".jsp");
requestDispatcher.forward(req, resp);
} catch (DAOException e) {
errorOccured(resp);