package com.decker.Essentials.User;

import java.net.HttpCookie;
import java.security.MessageDigest;
import java.sql.ResultSet;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.sipc.se.dao.factory.OperateFactory;

public class User
{
    private UserType Type;
    private Cookie[] Cookies;

    public User(HttpServletRequest request, HttpServletResponse response)
    {
	this.Cookies = request.getCookies();
	if (this.Cookies.length == 0)
	{

	}
	this.setUserType(UserType.Anonymous);
    }

    private void setUserType(UserType userType)
    {
	// if(seesen)
	this.Type = userType;
    }

    public UserType getUserType()
    {
	// if(seesen)
	return this.Type;
    }

    public static Cookie[] GetLoginCookies(String username, String password)
    {

	try
	{
	    password = new String(MessageDigest.getInstance("MD5").digest(password.getBytes()));
	    ResultSet resultSet = OperateFactory.getInstance().getDAOInstance().doQuery(String.format("SELECT * FROM Essentials.User WHERE UserID = '%s' and Password = '%s' ", username, password));
	    if (!resultSet.next())
	    {
		return new Cookie[] { new Cookie("identification", username), new Cookie("varify", password) };
	    }
	} catch (Exception e)
	{
	    System.out.print(e.toString());

	}

	return new Cookie[0];
    }
}

@@ -403,39 +403,8 @@
 pe;%0D
-%0A    private Cookie%5B%5D Cookies;%0D
 %0A%0D%0A 
@@ -489,23 +489,12 @@
 %7B%0D%0A%09
-this.Cookies = 
+if (
 requ
@@ -513,28 +513,8 @@
 es()
-;%0D%0A%09if (this.Cookies
 .len
@@ -532,15 +532,13 @@
 %09%7B%0D%0A
-%0D%0A%09%7D%0D%0A%09
+%09    
 this
@@ -572,16 +572,23 @@
 mous);%0D%0A
+%09%7D%0D%0A%09%0D%0A
     %7D%0D%0A%0D

Remove Cookies field from user