take a look at the source NOT the doc org.apache.pluto.container.impl.HttpServletPortletResponseWrapper @Override public ServletOutputStream getOutputStream() throws IOException { return mimeResponse != null ? (ServletOutputStream)mimeResponse.getPortletOutputStream() : DummyServletOutputStream.getInstance(); }
and the call to javax.portlet.MimeResponse.getPortletOutputStream does return back an OutputStream 355 public java.io.OutputStream getPortletOutputStream() 356 throws java.io.IOException; i downloaded pluto and the portlet-spec-2.0 then did a system wide grep for ByteArrayOutputWebOutputStream and found \Pluto>grep -S -l ByteArrayWebOutputStream *.java i have dl latest Pluto 2.0 container sources and the latest portlet-2.0 from http://svn.apache.org/repos/asf/portals/portlet-spec/trunk/portlet-api_2.0_spec/ so my advice to you is grab the latest source ..build the jar and deploy it OR take the java class with wrong signature org.apache.pluto.container.impl.HttpServletPortletResponseWrapper.java and change the signature so getOutputStream method returns ServletOutputStream instead of incorrect com.sun.faces.portlet.ByteArrayWebOutputStream Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 22 Apr 2010 20:14:05 +0100 > From: rstoyanc...@vmware.com > To: pluto-user@portals.apache.org > Subject: Re: ClassCastException using Sun's jsf-portlet.jar in Pluto 2.0 > > Apologies once more for the duplicate mailings. It seems using the forum > pages(http://old.nabble.com/Apache-Pluto-f14378.html) doesn't work too well. > > No response to the message below? > > > ----------------------------------------------------- > Hi, > > Firstly, I apologize for having my message go out multiple times. I was > using a forum page (http://old.nabble.com/Pluto---User-f200.html) that > continues to show 0 replies and a warning that the message has not been > accepted. I can't see why that is. I've subscribed to the mailing list but I > don't get any emails either. At the end I found the responses on the mailing > list archive. Not sure what I'm doing wrong. > > @Martin, with regards to your suggestions, did you mean to point to this > source? > > http://fisheye5.cenqua.com/browse/glassfish/appserv-jstl/src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java?r=1.5&k= > > The class cast fails on com.sun.faces.portlet.ByteArrayWebOutputStream (as > opposed to java.io.ByteArrayOutputStream). I'm not sure why changing the > above source code would have any impact? Also the application is using JSF > with Facelets, there is no jstl usage. > > The reason I pointed to HttpServletPortletResponseWrapper is because it > calls javax.portlet.MimeResponse.getOutputStream(). For good or for bad the > JavaDoc for that method says it returns a plain java.io.OutputStream: > > http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/MimeResponse.html#getPortletOutputStream() > > Instead of casting to ServletOutputStream, couldn't > HttpServletPortletResponseWrapper create an instance of ServletOutputStream > that wraps the OutputStream returned by MimeResponse? > > Thanks, > Rossen _________________________________________________________________ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5