Hi Jaron

Generally JSR168 portlets are not the right choice for file downloads. JSR168 portlets ate intended for delivering visual formats like HTML, WML and not much else. JSR286 portlets improve this, but neither Jetspeed or IBM Websphere Portal implement it yet (IBM release is in beta test).

The usual solution is to provide the file download from a standard Tomcat servlet. JSR168 guarantees that if the servlet is part of the same web application, it will share session data with the portlets in the web application (i.e. application scope session data). You specify the servlet in your portlet application's web.xml as normal. As it is a standard servlet, it is easy to make it respond to any chosen URL.

This is the solution I have used to render PDFs and CSV files. The portlet page has links to download a PDF for instance, but this points to a standard servlet to do the actual rendering.

Regards

Ron

----- Original Message ----- From: "Jaron van Golverdinge Schut" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, August 23, 2008 12:06 AM
Subject: Ajax and filedownloading support in jetspeed-2


Hello,



We are currently looking for a way to enable ajax requests and file
downloads with jetspeed-2 inside the security context of jetspeed. We
have looked at the different pipelines and got some things to work but
it is very hacky. Several things remain unclear to allow us to implement
a clean solution.



First question is how to build an url to a different pipeline?



Standard ways of building an url with <portlet:someURL /> or
RenderResponse.createSomeURL() do not allow one to specify a different
base url. From a portlet page that was requested as
www.host.com/jetspeed/portal/blablabla using standard url utilities
results in a www.host.com/jetspeed/portal/blablabla url while I would
wish to have a www.host.com/jetspeed/fileserver/blablabla url. Is this
possible?



The current hack in use is a manually created url like
www.host.com/jetspeed/fileserver/export?portlet=portletwar::portletname&
blablabla

This will call the correct portlet. The problem is that the
PortletRequest object has no parameters set. Neither is there a way to
specify that the processAction() should be called instead of the
render() method.



Any help is appreciated,





JWA van Golverdinge Schut





DISCLAIMER:

Dit bericht (met bijlagen) is zorgvuldig samengesteld. Voor eventuele onjuistheid en/of onvolledigheid van de hierin verstrekte informatie aanvaardt Kennisnet geen aansprakelijkheid. Aan de inhoud van dit bericht (met bijlagen) kunnen geen rechten worden ontleend. De inhoud van dit bericht (met bijlagen) kan vertrouwelijke informatie bevatten en is uitsluitend bestemd voor de geadresseerde van dit bericht.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to