tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Coonrod>
Subject Help! How to deal with null session variables??
Date Thu, 14 Sep 2000 15:04:08 GMT
I frequently crash pages with nullPointerExceptions when trying to get 
session variables into a string.

What I want is:

String MyVal=session.getValue("x").toString();

and if x isn't there, I'd like ""

View raw message