• Post Reply Bookmark Topic Watch Topic
  • New Topic

about request.getAttribute  RSS feed

 
sreejesh nair
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i am trying to get the value of an object from the jsp page whose value is set in the controller i am getting null value.

i am setting the value like request.setAttribute("yourname", "alex");

and retreiving like this...request.getAttribute("yourname");

but i am getting the null value ..what can be the reason for it
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are directly accessing the JSP page then surely null will come,but if you are accessing the JSP page through controller then it wont come.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you transitioning from the controller to the JSP?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!