This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes problem to display session attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem to display session attribute" Watch "problem to display session attribute" New topic
Author

problem to display session attribute

Vaishali Paramane
Ranch Hand

Joined: Mar 05, 2007
Posts: 106
Hi
I want to dispaly username
I am getting error in following line

<td><html:text property="userName" size="30" value="<%=session.getAttribute("name") %>" /></td>

if I remove value attribute it works fine. what is wrong in value attribute?

thanks for help


SCJP, SCJD
Preparing for SCWCD
aseem agarwal
Greenhorn

Joined: Oct 17, 2009
Posts: 9
what is the exact error..can you please write it here...
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Might be friendly exception null pointer.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Vaishali Paramane
Ranch Hand

Joined: Mar 05, 2007
Posts: 106
Hey my problem solved
I cast session get attribete like value="<%=(String)session.getAttribute("name") %>" now it is working.

Thanks for help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem to display session attribute
 
Similar Threads
Spring MVC 3: java.lang.IllegalStateException
Problem in Creating Dynamic Link from Display Table
JSTL <c:forEach .../> tag not working with collection
On htm:multibox
JSP Tags - Attributes passed returns NULL [SOS Please help]