Craig,
I finally had some spare time to experiment with some of your
suggestions. Everything seems to work fine but I can't seem to get
the INCLUDEIF or EXCLUDEIF to work when MATCH="null". I don't know
if this is a problem with my coding or the servlet engine
implementation (JRun 2.3 on NT4).
Here's the source code for my ErrorBean:
public class ErrorBean {
protected String message;
// Default constructor
public ErrorBean() {
message = null;
}
// Other constructor
public ErrorBean( String m ) {
message = m;
}
public void setMessage( String m ) { message = m; }
public String getMessage() { return message; }
}
Here's the JSP file that WORKS correctly. If I access the page
directly via the JSP's URL, the "no error message" should appear. If
I access the page via the controlling servlet, I will see the error
message created by the servlet.
<HTML>
<BODY>
<USEBEAN NAME="err" TYPE="ErrorBean" LIFESPAN="PAGE">
</USEBEAN>
<INCLUDEIF PROPERTY="err:message" VALUE="null" MATCH="exact">
<P>There is no error message!</P>
</INCLUDEIF>
<EXCLUDEIF PROPERTY="err:message" VALUE="null" MATCH="exact">
<P>Here is the error message:</P>
<P><B>[Error=<DISPLAY PROPERTY="err:message">]</B></P>
</EXCLUDEIF>
</BODY>
</HTML>
I originally tried to use
<INCLUDEIF (or EXCLUDEIF) PROPERTY="err:message" MATCH="null">
but it did not work. If the message was null, the INCLUDEIF was
ignored and the EXCLUDEIF was displayed (with "[Error=null]").
D J
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".