• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

returning a object using custom defined tags

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
in my application i m using custom defined tag.
How to return a object using custom defined tag, so that i can access in the jsp page that object.
thanks in advance
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are several ways to doing this, depending on how you want to use the object and whether you are using the JSTL expression language:
(1) Put it in the page context and access it from the page with the <jsp:useBean> tag
(2) Put it in the page context and access it from the page with the expression language (if you are using JSTL)
(3) Put it in the page context and, using the TLD or a TagExtraInfo class, declare that you want a scripting variable created on the JSP page so that you can access the object directly (e.g. <%= myObject.getX(); %>
Does that help, or do you need further implementation details?
Simon
 
Something about .... going for a swim. With this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic