Thanks Mohan,

I shall look into it.

Anil


From: <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: WSRP4J + JSF Problem
Date: Fri, 4 Aug 2006 13:26:33 +0530

Anil,
      We are trying to use WSRP for many JSF pages. I found this link
http://www.oasis-open.org/archives/wsrp/200504/msg00012.html about
JSF/Portlets.

Thanks,
Mohan

-----Original Message-----
From: Anil Khuman [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 03, 2006 3:56 PM
To: [email protected]
Subject: RE: WSRP4J + JSF Problem

OK,

This seems to be a problem with the MyFaces implementation of mehtod
'selectContentType' in class

org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils. It
appears that code sets the default content type to null and

then attempts to set it to either text/html or text/xhtml if it finds a
matching string in ContentTypeList. From what I can see

it does not equate text/* to either text/html or text/xhtml, so the
content type remains null and an exception is thrown. This

can be 'fixed' by initializing variable 'selectContentType' like so:

        String selectedContentType = HTML_CONTENT_TYPE;

Which is at line 999 for the file $Revision: 422578 $ $Date: 2006-07-17
00:29:45 +0000 (Mon, 17 Jul 2006) $

That now allows the MyFaces portlet to be correctly rendered, but I'm
not sure it is the ideal solution.

Anil


------------------------------------------------------------------------
-----------------------------------------------
Hi,

I am having problems getting a JSF (MyFaces) portlet to work through
WSRP4J.
When I try to access the remote portlet I get the

exception detailed below in Tomcat's console. I have the same porlet
working fine when run locally and the 'wsrp-testportlet'

also works correctly. It seems that it doesn't like me using any JSF
tags in my .jsp file. If I use plain HTML or JSP tags

and/or scriplets it works fine, but the use of any JSF tags instead
(i.e.
<f:view> ..) causes the exception shown. I can't see

where the problem lies since the portlet works without a problem when
run locally.

The exception seems to indicate that the returned content is not of a
supported type, but I am sure it is 'text/html' (as

specified in my 'web.xml' file). I have also noted that changing the
content type to something other than 'text/html' inside

the actual JSF file prevents the exception being thrown but then causes
no content to be rendered inside the portlet.

Any help with this will much appreciated.


Anil





Tomcat log output:

2006-07-31 14:54:38 ApplicationDispatcher[/google-portlet]
Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: ContentTypeList does not contain a
supported content type: application/soap+xml,

application/dime, multipart/related, text/*
        at
org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.selectCo
ntentType(HtmlRendererUtils.java:1043)
        at
org.apache.myfaces.renderkit.html.HtmlRenderKitImpl.createResponseWriter
(HtmlRenderKitImpl.java:126)
        at
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.jav
a:936)
        at
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
        at
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
        at
        ..................................................




This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.


Reply via email to