Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

application/octet-stream in jsr-168 portlets

3 views
Skip to first unread message

Medicherla

unread,
Dec 4, 2007, 4:21:40 PM12/4/07
to
hi,<br />
I'm trying to open an .exe file for users to download from inside the jsr-168 portlet. I'm getting the following exception when i set the response content type as application/octet-stream. I'm using Websphere Portal 6. Any help would be appreciated.<br />
<br />
thanks<br />
<br />
harsha<br />
<br />
javax.portlet.PortletException: java.lang.IllegalArgumentException: application/octet-stream<br />
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:251)<br />
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)<br />
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)<br />
at com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)<br />
at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:587)<br />
at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:247)<br />
at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:115)<br />
at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:161)<br />
at com.ibm._jsp._Control._jspx_meth_portal$1skin_portletRender_0(_Control.java:953)<br />
at com.ibm._jsp._Control._jspx_meth_portal$1logic_if_4(_Control.java:985)<br />
at com.ibm._jsp._Control._jspService(_Control.java:582)<br />
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)<br />
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br />
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)

Jim Barnes

unread,
Dec 4, 2007, 6:28:17 PM12/4/07
to
if you are doing this in the render phase of websphere portal, then it will fail, the content type for the page has already been done. now if you want to redirect the response from the action phase to a servlet that downloads the exe file you can do that. but portal has already set the content type as html and the portlet cannot change it.<br />
<br />
IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0<br />
IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0<br />
<br />
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
0 new messages