try
if ("admin".equals(session.getAttribute("accesslevel")) {this should help eliminate the null error. Rama > -----Original Message----- > From: A mailing list for discussion about Sun Microsystem's > Java Servlet API Technology. > [mailto:[EMAIL PROTECTED]] On Behalf Of Mark Galbreath > Sent: Monday, December 17, 2001 5:08 PM > To: [EMAIL PROTECTED] > Subject: Logic Problem > > > Guys, > > I'm setting a session attribute in a helper class and > returning it to the controller servlet. When I print out > > out.println("session = " + session.getAttribute( > "accesslevel").toString()) > > it returns "session = admin" > > but when I do a logical test on > > if (session.getAttribute( "accesslevel").toString().equalsIgnoreCase( > "admin")) > > I get "false" > > Any ideas? > > Thanks, > Mark _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
