Here's some more info, may help you all to understand what I am trying to do:
Code:
<%@ page contentType="text/html" %>
<%@ page import="sod.*" %>
<%@ taglib prefix="c" uri="[URL unfurl="true"]http://java.sun.com/jsp/jstl/core"[/URL] %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML> if (dataBean.getloginStatus() == "false")
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
function checksubmit() {
if (document.login.userid.value == "") {
alert("Please enter a User ID.")
document.login.userid.focus()
return false
}
if (document.login.password.value == "") {
alert("Please enter a password.")
document.login.password.focus()
return false
}
}
</script>
<HEAD>
<title>QC_SOD Log In Page</title>
</HEAD>
<BODY>
<FORM METHOD=post name="login" onSubmit="return checksubmit()" ACTION="/qcsodgui/sodAuth">
<TABLE cellSpacing=0 cellPadding=3 width=400 border=0 ALIGN="CENTER">
<TR>
<TD width=100>User ID:</TD>
<TD><INPUT id=userid name=userid></TD>
</TR>
<TR>
<TD width=100>Password:</TD>
<TD><INPUT id=password type=password name=password></TD>
</TR>
<TR>
<TD width=100> </TD>
<TD><INPUT type=submit value=Submit name=Submit></TD>
</TR>
<jsp:useBean id="dataBean" scope="request" class="sod.sodDataBean">
<jsp:setProperty name="dataBean" property="loginStatus" value="empty" />
</jsp:useBean>
<c:out value="${dataBean.loginStatus}" />
<c:if test="${dataBean.loginStatus == 'true'}">
<TR>
<TD COLSPAN=2><B>Login Authorization Failed, Please Try Again</B></TD>
</TR>
</c:if>
<% if (pageContext.findAttribute("dataBean") != null)
{
sodDataBean myBean = (sodDataBean) request.getAttribute("dataBean");
if (dataBean.getLoginStatus() == "false")
{ %><TR><TD COLSPAN=2><B>Login Authorization Failed, Please Try Again</B></TD></TR>
<% }} %>
</TABLE>
</FORM>
</BODY>
</HTML>
The sodDataBean only has one attribute (loginStatus) and two methods (getLoginStatus() and setLoginStatus()). It public and implements Serializable...
The jsp page is supposed just the two imput boxes the first time they arrive at it. And that works OK. When they type in a user name and password, it submits to a servlet... The servlet creates an instance of this bean and then tries to connect to the database using the id and password provided. This fails every time on purpose because i want to get this page's code working. When the DB connection fails, it does the following:
Set the bean's property of loginStatus to "false"
Add the bean as an attribute of the request
Redirect the client via server-side redirection back to the login page.
At this point, the login page has a request object with an attribute ("dataBean") that is of type sodDataBean. When doing the jsp:useBean to grab this attribute, nothing seems to be happening. All of the JSTL tags (c:if, c:set, c

ut, etc) don't seem to be working. Which is odd because the scriptlet above between the <% %> tags works perfectly.
When i try to see what the value of the bean's property is by using the following code:
Code:
<c:out value="${dataBean.loginStatus}" />
or
Code:
<c:out value="${dataBean.getLoginStatus()}" />
or even using c:set to set a variable to the two expressions shown above, nothing comes out of the c

ut except the actual litteral expression. It almost seems like the c

ut tag isn't evaluating the expression.
I don't understand what the problem i'm encountering is. Is anyone able to help me?
B