File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
TLD Doubt
Question on Empty body content of Simple Tag Handlers
SimpleTagSupport class
body-content as scriptless
TLD files variable element