I'm getting a null in a session variable
843835Dec 9 2002 — edited Dec 26 2002I'm getting a null value when I want to session.getAttribute("admin_capview")
The problem is that in my Development PC (Dell, WinXP) works fine, but when I run this JSP in my Production Server (HP, Win2000) from my Dell-PC it doesn't work. But wait there's more, When I run this same JSP IN my Production Server it works FINE. What's wrong with this thing?!?, I have the same version of Java and Forte in both servers. Any clue????
I've read and tried almost all the suggestions in this Forum, all of them behave in the same way. HELP
JSP1: Creation of my session
synchronized(session) {
if (el_nombre.compareTo("admin")==0) {
String valor = "1";
session.setAttribute("admin_capview", valor);
}
else{
String valor = "0";
session.setAttribute("admin_capview", valor);
}
}
JPS2: Validation of my session
request.getSession(true);
String obj_getsession = (String) session.getAttribute("admin_capview");
//Old fashion Debugger
System.out.println("USUARIO str: "+ obj_getsession);
// From Dell, I receive a null
// From any other, I receive a String
// In the HP, I recieve a String
// From Dell in my Dell, I receive a String
if ( obj_getsession.compareTo("0")==0 )
//code
else
//code