aspose file tools*
The moose likes JSP and the fly likes How do u pass an object to a taglib from a jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How do u pass an object to a taglib from a jsp?" Watch "How do u pass an object to a taglib from a jsp?" New topic
Author

How do u pass an object to a taglib from a jsp?

Xuefei He
Greenhorn

Joined: Oct 22, 2003
Posts: 1
i'm working on a project that requires using the STRUTS technology.
at first, i didn't use the taglib for cleaner look of the codes.
then i use the taglib to iterate the data and i realized that i didn't know how to get the List object(which is the one passed from the STRUTS ACTION) from jsp.
i learned how to set attributes into jsp by using TagExtraInfo Class, how do i get an attribute ( the List ) from the jsp?
-------------------------------
currently i just "new" the database managing class again in the taglib class to get the List, so that makes the List in STRUTS ACTION useless.


be nice
Brusk Baran
Ranch Hand

Joined: Nov 15, 2001
Posts: 132
just put that object in the pageContext, PAGE Scope; in your jsp page.
then get it inside the Tag Handler Class via the implicitly given pageContext, by the Adapter class...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do u pass an object to a taglib from a jsp?