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 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt in jsp:attribute" Watch "Doubt in jsp:attribute" New topic
Author

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".

test.tld:


index.jsp:


Thanks
Srividhya
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
Greenhorn

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt in jsp:attribute
 
Similar Threads
Question on Empty body content of Simple Tag Handlers
body-content as scriptless
SimpleTagSupport class
TLD Doubt
TLD files variable element