03-30-04 08:33 PM
You can't output an Excel spreadsheet from inside a portlet during it's
service (doView, doHelp, etc) method processing. Output from a portlet is
combined with other portlets and themes and skins to build up a single HTML
page to send to the browser. You can't just dump the bytes of a spreadsheet
(or any other object such as graphics) into an HTML stream.
What you need to do is write a servlet that outputs these bytes and package
it with your portlet. Then your portlet needs to write out a URL to the
servlet into the HTML stream that will cause the browser to invoke it and
retrieve the bytes for the spreadsheet when needed.
Remember: A portlet's output is ALWAYS included into the middle of a bigger
HTML (or WML, or whatever markup) page... It is NEVER the entire page as it
can be in servlet programming.
[ Post a follow-up to this message ]
|