dcsimg
Variable may not have been initialize
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   cyhe_cyhe
Posted On:   Monday, August 19, 2002 01:59 AM

Im using Tomcat version 3 and running in Unix platform.

i have a statement like this

if (session.getValue("a") != null){
out.println("Hello");
}

Have are the errors i found.

Variable session may not have been initialize .
Variable out may not have been initialize.

Re: Variable may not have been initialize

Posted By:   Lasse_Koskela  
Posted On:   Monday, August 19, 2002 02:28 AM

Normally (i.e. not in JSP code) that message implies the following situation:

String s;
System.out.println("String: " + s);

This throws the given error because s is not initialized to its default value (null) as one might assume.


In your case, it's hard to say without seeing the code. The session variable should be available, but... Perhaps you could post the first few lines of your JSP?

About | Sitemap | Contact