nullity

Ads

 
 

Share on Google+Share on Google+

Jagadeesh
nullity
3 Answer(s)      9 years ago
Posted in : Java Beginners
Ads
View Answers

September 20, 2008 at 5:57 PM


Hi friend,


<%
String abc = null;
session.setAttribute("sessvar" , abc);
if(session.getAttribute("sessvar")==null)
{
out.println("Null Value");
}
else
{
out.println("Not Null Value");
}
%>


September 20, 2008 at 5:58 PM


For any more problem explain in details.


Thanks



September 20, 2008 at 6:05 PM


Hello

Jajadish;

use this inside ur servlet................

HttpSession session = request.getSession();
String name = (String)session.getAttribute("mynmae");
if(name == null){
session.setAttribute("myname", "Raj");
}



Thanks
Rajanikant

Ads









Related Tutorials/Questions & Answers:
Advertisements

Ads

 
Advertisement null

Ads