File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes returning a object using custom defined tags Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "returning a object using custom defined tags" Watch "returning a object using custom defined tags" New topic
Author

returning a object using custom defined tags

sun moon
Greenhorn

Joined: Oct 09, 2002
Posts: 28
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
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1860
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: returning a object using custom defined tags
 
Similar Threads
How do I add multiple taglib's to my deployment descriptor?
Q from Hanu's mock test
body-content for tag files, classic and simple tags
Writing Image Bytes on Response Stream
nested custom tags