protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
			HttpSession session = request.getSession();
			response.setContentType("text/html;charset=UTF-8");
			PrintWriter out = response.getWriter();
			System.out.println("GroupChatServlet");
			UserBean currentUser=((UserBean)(session.getAttribute("currentSessionUser")));
        	try{
			Connection groupChatConn = null; 
			ResultSet groupChatResult = null;
			Statement groupChatStatement = null;
			PreparedStatement groupChatPStatement = null;
			
			String groupChatQuery = "insert into proiect_chat (mesaj,data,ora,idMembru,idProiect) values (?, ?, ?, ?, ?)";
			String idProiectQuery = "select idProiect from proiect where denumire='"+session.getAttribute("denumireProiect")+"'";
				try{
					groupChatConn=ConnectionManager.getConnection();
					groupChatStatement=groupChatConn.createStatement();
					groupChatResult=groupChatStatement.executeQuery(idProiectQuery);
					
					String idProiect = null;
					if(groupChatResult.next()){
						idProiect = groupChatResult.getString("idProiect");
					}

				
					groupChatPStatement=groupChatConn.prepareStatement(groupChatQuery);
					
					Date currentDatetime = new Date(System.currentTimeMillis());
					
					groupChatPStatement.setString(1,request.getParameter("msj"));
					groupChatPStatement.setDate(2,new java.sql.Date(currentDatetime.getTime()));
					groupChatPStatement.setTime(3,new java.sql.Time(currentDatetime.getTime()));
					groupChatPStatement.setInt(4,currentUser.getUid());
					groupChatPStatement.setInt(5,Integer.parseInt(idProiect));
					
					groupChatPStatement.executeUpdate();
					
					
					//String getMessagesQuery = "select m.nume,m.prenume,pc.data,pc.ora from membri m, proiect p, proiect_chat pc "+
					//							"where m.idMembru=pc.idMembru and p.idProiect=pc.idProiect and idProiect='"+Integer.parseInt(idProiect)+"' "+
					//							"order by DATE(pc.data) ASC,TIME(pc.ora) ASC"
					//groupChatStatement=groupChatConn.createStatement();
					//groupChatResult=groupChatStatement.executeQuery(getMessagesQuery);
					
				}catch(Exception ex){System.out.println("Error inserting mesaj groupchat: "+ex);}
				finally{
					if(groupChatResult!=null){
						try{
							groupChatResult.close();
						}catch(Exception e){}                   
	                	groupChatResult=null;
	            	}
					if(groupChatStatement!=null){
                		try{
							groupChatStatement.close();
						}catch(Exception e){}
		                groupChatStatement=null;
					}
					if(groupChatConn!=null){
						try{
							groupChatConn.close();
						}catch(Exception e){}
						groupChatConn=null;
					}
        		}
				
				String referer = request.getHeader("Referer");
				response.sendRedirect(referer);
        	}catch(Throwable  theException){System.out.println("Exception is"+theException);}     
	}