In the following code snippet there is the isRowInDueCauseTable method (which in another class works properly) returns a boolean value. But using it in a JSP file, it always gives back true, altough it should change the isRowInDB variable accordingly. But it's always true, so isRowExists method always gets true as parameter. It seems like it only runs for the first time, and never evaluates again
if ( sAction == "newRow" ) {
            <%
            tblMgrHome = (TableManagerHome)pageEnv.get("ejb/TableManager");
            tblMgr = tblMgrHome.create();
            boolean isRowInDB = tblMgr.isRowInDueCauseTable(
                request.getParameter("REASON"),
                request.getParameter("TASK"),
                request.getParameter("RESULT"),
                request.getParameter("RESULT_CAUSE")
                );
                %>
            console.log("HERE IS THE BOOLEAN: " + <%=isRowInDB%>);
            isRowExists(<%=isRowInDB%>);
            setMenuClick(false);
        }
And I'm sure that it can also give back false, because that part of the application work. What is wrong with it?
 
    