Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

clarification required

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html>
<body>
<%request.setAttribute("name","J2EE");%>
<%=pageContext.getAttribute("name",PageContext.SESSION_SCOPE)%>
<body>
</html>


The result was 'J2EE'....I expected a null value....
Request anyone to clarify.

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should be null. Don't you set the "name" somewhere else ?
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx...you are correct.

i have rebuild the code like this,

<%request.setAttribute("mynewname","J2EE");%>
<%=pageContext.getAttribute("mynewname",PageContext.SESSION_SCOPE)%>

it prints null...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic