myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stan Silvert" <stan.silv...@jboss.com>
Subject RE: Problem with portlet integration (ClassCastException)
Date Mon, 14 Mar 2005 13:41:47 GMT
This is a known issue already logged in Jira, (MYFACES-123).  Matthias, Manfred, and myself
have been trying to figure out the best way to fix it.

Actually, I like your solution.  I'll look at it further.  Thanks for the input.

Stan Silvert
JBoss, Inc.
ssilvert@jboss.com
callto://stansilvert
> -----Original Message-----
> From: Böhringer Jochen [mailto:Jochen.Boehringer@tcc-products.de]
> Sent: Monday, March 14, 2005 6:24 AM
> To: myfaces-dev@incubator.apache.org
> Subject: Problem with portlet integration (ClassCastException)
> 
> Hi,
> 
> I tried to run my JSF Application as a portlet (using the latest myfaces
> version built directly from CVS yesterday). But I got a ClassCastException
> in UIComponentTag.setupResponseWriter()
> 
> In this line: ServletRequest request =
> (ServletRequest)facesContext.getExternalContext().getRequest();
> 
> Because getRequest does not return a ServletRequest in a portlet
> environment. The request variable is used in the next line to determine
> the contentType and characterEncoding for the response writer.
> 
> So I deleted the line above and determined the characterEncoding and
> contentType using the pageContext instance variable.
> 
> _writer = renderKit.createResponseWriter(new
> _PageContextOutWriter(pageContext),
>                     pageContext.getRequest().getContentType(),
>                     pageContext.getRequest().getCharacterEncoding());
> 
> 
> Now it works. But this was the first time I looked into the myfaces
> sources. So I'm not sure if this might have any side effects.
> 
> Should I open a bug on this?
> 
> Thx
> Jochen

Mime
View raw message