@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) {
		List<News> list;
		Iterator<News> newsIterator;
		newsDao newsDao = dao.newsDao.getNewsDao();
		list = newsDao.getListAllNews();
		newsIterator = list.iterator();
		StringBuffer st = new StringBuffer();
		st.append("<ul>");
		while(newsIterator.hasNext())
		{
			News news = newsIterator.next();
			st.append("<li>");
			st.append(news.getTitle());
			st.append(" <a href=\"adminController?operation=edit&id=");
			st.append(news.getId());
			st.append("\">Edit</a>");
			st.append(" <a href=\"adminController?operation=delete&id=");
			st.append( news.getId());
			st.append("\">Delete</a>");
			st.append("</li>");
		}
		st.append("<li><a href=\"adminController?operation=add&id=main\">");
		st.append("Add news</a></li>");
		st.append("</ul>");
		
		RequestDispatcher dispatcher = request.getRequestDispatcher("/mainadmin.jsp");
		request.setAttribute("menu", st.toString());
		try {
			dispatcher.forward(request, response);
		} catch (ServletException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}


	}