• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic