In my code I use the following to obtain a CookieParser
 
data.getCookies () 
 
I get the following error when Client Browser have cookies disabled -
 
java.lang.NullPointerException
        at
org.apache.turbine.util.parser.DefaultCookieParser.setRunData(DefaultCoo
kieParser.java:156)
        at
org.apache.turbine.services.rundata.DefaultTurbineRunData.getCookies(Def
aultTurbineRunData.java:518)
        at
org.mitre.connectme.web.modules.screens.Default.doBuildTemplate(Default.
java:47)
            
Default.java:47 is where I call data.getCookies ()  
 
Is there a way to test if a client has cookies enabled before calling
data.getCookies?  Is this the desired behavior?  I would think if
cookies were disabled, get cookies should just return a null cookie
parser.  I'm try to avoid a try catch block here.  There must be a more
elegant way.  Thoughts?
 
Mike


Reply via email to