David Castro wrote:
>
> As I understand it, you'll have to use the object equivalents to these types
> (Boolean, Integer, and so on), and then convert them to their base types on an
> as-needed basis. I had to do this to set and react to session variables:
>
> <% if ((Boolean)session.getAttribute("userloggedin")).booleanValue()
> { doSomething(); }
> %>
>
> -David Castro
> [EMAIL PROTECTED]
>
I found a nicer way to do this if you're interested.
So, if you have something to do on a boolean, do :
~Example:
<jsp:useBean id="exclude_addbands" class="java.lang.String"
scope="request">
<input type="submit" name="addband" value="Add Band">
</jsp:useBean>
I use this to exclude or include a submit button on a form. It's a bit
of an about face in the logic, but it means you can keep to using only
jsp tags rather than any script (kinder to graphic designers...).
It works owing to the way the useBean tag is implemented, in the
example, if "exclude_addbands" is not found in request scope, then
everything up to the </jsp:useBean> closing tag is "run".
So for your example you could use the presence/absence of a
"not_logged_in" object in session scope.
Jari
--
Jari Worsley
Senior Programmer
Hyperlink plc
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets