It's not a secret anymore!
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt in jsp:attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt in jsp:attribute" Watch "Doubt in jsp:attribute" New topic

Doubt in jsp:attribute

Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
Hello Ranchers

I have doubt in custom tag handler. I am going through HFSJ book. In chapter 9 its given that even if the <body-content>empty</body-content> we can have <jsp:attribute> but I am getting an error saying this tag cannot include body content and missing required attribute "user".



Jan Sterk
Ranch Hand

Joined: Jun 06, 2008
Posts: 139
Note that you have one '>' too much in the attribute closing tag. Dunno if that's the cause..

SCJP 1.4 (81%)<br />SCWCD 5 (95%)
Ganesh Dhakshinamurthy

Joined: Apr 08, 2007
Posts: 11
The extra '>' is considered as a body content and the EL ${username} evaluates to null. I guess this is the reason you are getting the error.
I agree. Here's the link:
subject: Doubt in jsp:attribute
It's not a secret anymore!