aspose file tools*
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
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