File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Don't get me started about those stupid light bulbs.
 
subject: problem to display session attribute
 
Similar Threads
JSP Tags - Attributes passed returns NULL [SOS Please help]
On htm:multibox
JSTL <c:forEach .../> tag not working with collection
Problem in Creating Dynamic Link from Display Table
Spring MVC 3: java.lang.IllegalStateException