Since the browser will issue a separate HTTP request to fetch the image and that you want a "raw" output of your class, I'd simply use a link to your struts application.
Alternatively, you can also use a "raw" Turbine layout & screen class within Jetspeed that would set the suitable return mime type and call your portlet to generate the bytes without creating the default navigation framework. Since this is mostly standard Turbine usage, I'd advise you to look for examples in the Turbine mailing-lists archive and Turbine website. -- Rapha�l Luta - [EMAIL PROTECTED] Jakarta Jetspeed - Enterprise Portal in Java http://jakarta.apache.org/jetspeed/ > -----Message d'origine----- > De : Mitchell Morris [mailto:[EMAIL PROTECTED]] > Envoy� : mercredi 19 f�vrier 2003 22:52 > � : [EMAIL PROTECTED] > Objet : Dynamic image generation > > > I'm trying to develop a portlet that will display a > dynamically-generated > graph of some data, customized using the user's settings. I > have a Struts > web-app that will do the whole deal, and I'm now trying to > portlet-enable > it, but I'm so new to Jetspeed I'm not sure I'm heading the correct > direction. I assume I would define my portlet as a > VelocityPortlet, with > a simple Velocity template consisting of just an <img> tag. > My problem is > knowing what to put as the image source. > > I tried searching the mailing lists directly and via Google > for "dynamic > image", "image generation", "image portlet", "mime portlet", and other > variations. None of which found anyone else talking about > dynamic image > generation from within Jetspeed. > > I see a few ways to approach the problem: > (1) deploy the generation servlet outside of Jetspeed with a > convoluted > URL that encodes all the settings chosen and returns the > image data > (2) edit Jetspeed's "web.xml" to add the generation servlet into the > context under some mapping where my servlet and Jetspeed > can share an > HttpSession for IPC > (3) generate random files to litter the filesystem and a cron > job to clean > them > up after they get old enough > > My preferred solution is a <something> in Jetspeed that can return > MIME-encoded > images inline without using the filesystem; that is, a URL > the browser can > fetch that returns content-type=image/png but invokes a class within > Jetspeed. > Is there anything like this out of the box? > > +Mitchell > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ********************************************** Vivendi Universal - HTTP://www.vivendiUniversal.com: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material of Vivendi Universal which is for the exclusive use of the individual designated above as the recipient. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact immediately the sender by returning e-mail and delete the material from any computer. If you are not the specified recipient, you are hereby notified that all disclosure, reproduction, distribution or action taken on the basis of this message is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
