I am passing data through a bean, but whenever I use the passed data in a if function it never passes the first check. I will also post the result for just printing out the Get_Functions I am using.
The inputs I use are just admin and password.
JSP Code:
<jsp:useBean id="user" class="User.GetInfo" scope="session"/> 
<HTML>
<BODY>
<% if (user.getUsername() == "admin") {
    if (user.getPassword() == "password" ) {
        session.setAttribute( "LoggedIn", true );
        response.sendRedirect("AdminPage.jsp");
    } else {
        session.setAttribute( "LoginError", "Wrong password." ); 
        response.sendRedirect("AdminLogin.jsp");
    }
} else {
    session.setAttribute( "LoginError", "Wrong username." ); 
    response.sendRedirect("AdminLogin.jsp");
}
%>
</BODY>
</HTML>
Results for just printing out code:
You entered
 Name: admin
 Email: password
