Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Jagadeesh
nullity
3 Answer(s)      6 years and 2 months ago
Posted in : Java Beginners



Advertisement
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


Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com