This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If you want to reuse the JSP fragment that builds the table, a much more conventional -- and considerably less hair-pulling -- means of doing that is with a custom tag or an include file. [ June 14, 2005: Message edited by: Bear Bibeault ]
My point was that you don't want to save the JSP output and try to reuse the output.
If you want the table to be the same in both places, use the same JSP fragment to generate it. By placing the fragment in an include file (or within a custom tag) you don't need to copy and paste any code, and can use it from multiple locations.
Why do you want to save the output for later display rather than just generating it on the fly? That's a real hinky thing to try to be doing.
Joined: Sep 30, 2004
What I am after is this.
The client uploads photos that get written into a table in the JSP (a gallery). As they upload they can check how it looks, changing the photos as they wish.
The photo names and locations are stored in a DB on the server.
That same table is written as part of a report to a file on the server by a class in the system. It looks up the locations of the files from the DB and generates the HTML to create the photo gallery.
Right now I'm building the table in JSP so the client can see it, than creating it again in a java class so it can be written into the report.
It would be nice if I could consolidate the 2, ideally creating all HTML in the JSP and none in Java.