I am attempting to get the Shale Blank starter app implemented as a portlet
running in the Pluto 1.1 portlet container using the Apache Portals JSF
Bridge and have not had much luck in getting it working. I am just starting
to dive into Shale and JSF so I thought I'd ask if anyone has tried this and
might provide me with some insights into what could be going wrong.

The first problem I encountered with converting the Blank war is that using
the jsp:forward to "/welcome.faces" within index.jsp results in "
javax.faces.FacesException: Unsupported context type
org.apache.catalina.core.ApplicationContextFacade" when the JSF bridge tries
to obtain the faces context. I tried replacing the jsp:forward with a
jsp:include, which is what pluto commonly prefers, but the result was the
same.

With Pluto, the index.jsp reference is made in the portlet-app descriptor
instead of in the welcome-file element of the web-app descriptor. When I
tried replacing the "/index.jsp" declaration in the portlet-app descriptor
with "/welcome.faces" I don't get an exception but it appears that a lot of
the LifecycleListener behavior gets skipped and while the WelcomeBean gets
constructed and accessed, the bean's prerender method never gets called so
the date does not get initialized or get displayed next to the " The current
date and time is:" label. I've included debug log entries for both the web
app and portlet implementations of Shale Blank at the end of this message.

My current thinking is to try to convert the JSF Portlet Demo from the
Portals Bridges project to the Shale framework. I have gotten the JSF
Portlet Demo working for the most part but I have a sneaking suspicion that
I will eventually run into the same issue(s) that I am currently facing with
converting Shale Blank into a portlet.

Thanks for any insights,
Scott

Here's those log excerpts....

Shale Blank as web app
-----------------------------------
17:19:58,701 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
org.apache.shale.CONTEXT_ATTR,{initParam=
[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED])
17:19:58,703 DEBUG [LifecycleListener] ServletRequestAttributeReplaced(
org.apache.shale.CONTEXT_ATTR,{initParam=
[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED]
},[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED])
17:19:58,704 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
org.apache.shale.view.PHASE_ID,RESTORE_VIEW(1))
17:19:58,704 DEBUG [JspStateManagerImpl] No tree structure state found in
client request
17:19:58,704 DEBUG [ViewViewHandler] setupViewController(/welcome.jsp,false)
17:19:58,705 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
org.apache.myfaces.config.beansUnderConstruction,[])
17:19:58,705 INFO  [WelcomeBean] >>>>>>>>> constructing WelcomeBean
17:19:58,705 DEBUG [LifecycleListener] ServletRequestAttributeAdded(welcome,
[EMAIL PROTECTED])
17:19:58,705 DEBUG [LifecycleListener]
ServletRequestAttributeAdded(org$apache$shale$view$VIEW_NAME_RENDERED,welcome)
17:19:58,705 DEBUG [LifecycleListener]
ServletRequestAttributeAdded(org$apache$shale$view$VIEWS_INITIALIZED,[])
17:19:58,705 DEBUG [LifecycleListener] ServletRequestAttributeAdded(class
org.apache.myfaces.renderkit.html.util.JavascriptUtils.OLD_VIEW_ID
,/welcome.jsp)
17:19:58,705 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
org.apache.shale.view.PHASE_ID,RESTORE_VIEW(1))
17:19:58,705 DEBUG [LifecycleImpl] exiting from lifecycle.execute in
restoreView because getRenderResponse is true from one of the after
listeners
17:19:58,706 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
org.apache.shale.view.PHASE_ID,RENDER_RESPONSE(6))
17:19:58,706 INFO  [WelcomeBean] >>>>>>>>> prerender
17:19:58,710 INFO  [WelcomeBean] >>>>>>>>> setTimestamp: Mon Sep 11 17:19:58
PDT 2006
17:19:58,710 DEBUG [LifecycleListener]
ServletRequestAttributeRemoved(org$apache$shale$view$VIEW_NAME_RENDERED,welcome)
17:19:58,712 DEBUG [LifecycleListener] ServletRequestAttributeReplaced(
org.apache.shale.CONTEXT_ATTR,{initParam=
[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED]
},[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED])
17:19:58,712 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
javax.faces.webapp.UIComponentTag.COMPONENT_STACK,[])
17:19:58,968 DEBUG [LifecycleListener]
ServletRequestAttributeAdded(messages,
[EMAIL PROTECTED])
17:19:59,052 INFO  [WelcomeBean] >>>>>>>>> getTimestamp: Mon Sep 11 17:19:58
PDT 2006
17:19:59,055 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW,
[EMAIL PROTECTED])
17:19:59,085 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
javax.faces.webapp.UIComponentTag.COMPONENT_STACK,[])
17:19:59,144 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
org.apache.shale.CONTEXT_ATTR,{initParam=
[EMAIL PROTECTED],
headerValues=
[EMAIL PROTECTED],
facesContext=null, header=
[EMAIL PROTECTED], response=
[EMAIL PROTECTED], cookies=
[EMAIL PROTECTED], requestScope=
[EMAIL PROTECTED],
paramValues=
[EMAIL PROTECTED], context=
[EMAIL PROTECTED], param=
[EMAIL PROTECTED], request=
[EMAIL PROTECTED], sessionScope=
[EMAIL PROTECTED],
applicationScope=
[EMAIL PROTECTED])
17:19:59,145 DEBUG [LifecycleListener]
ServletRequestAttributeRemoved(org$apache$shale$view$VIEWS_INITIALIZED,[
[EMAIL PROTECTED])
17:19:59,145 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
org.apache.shale.view.PHASE_ID,RENDER_RESPONSE(6))
17:19:59,146 DEBUG [LifecycleListener] ServletRequestAttributeAdded(
javax.servlet.forward.seen,true)
17:19:59,146 DEBUG [LifecycleListener]
ServletRequestAttributeRemoved(welcome,
[EMAIL PROTECTED])
17:19:59,146 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
javax.servlet.forward.seen,true)
17:19:59,146 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
org.apache.myfaces.config.beansUnderConstruction,[])
17:19:59,146 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(class
org.apache.myfaces.renderkit.html.util.JavascriptUtils.OLD_VIEW_ID
,/welcome.jsp)
17:19:59,146 DEBUG [LifecycleListener] ServletRequestAttributeRemoved(
org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW,
[EMAIL PROTECTED])
17:19:59,146 DEBUG [LifecycleListener]
ServletRequestAttributeRemoved(messages,
[EMAIL PROTECTED])

Shale Blank as portlet (bypassing index.jsp that uses a jsp:forward)
--------------------------------------------------------------------------------------------------
18:25:35,209 DEBUG [PortalDriverServlet] Processing render request.
18:25:35,209 DEBUG [PortalDriverServlet] Rendering Portal: Requested Page:
null
18:25:35,209 DEBUG [RenderConfig] Requested page is null.  Returning
default: Wiklets
18:25:35,209 DEBUG [PortalDriverServlet] Dispatching to:
/WEB-INF/themes/pluto-default-theme.jsp
18:25:35,211 DEBUG [PortletTag] Evaluated portletId to: /wiklet.blank
18:25:35,211 DEBUG [PortletTag] Rendering Portlet Window:
[EMAIL PROTECTED]
18:25:35,211 DEBUG [PortletContainerImpl] Portlet Container [Pluto Portal
Driver]: Render request received for portlet: blank
18:25:35,212 DEBUG [RenderRequestImpl] Created render request for:
[EMAIL PROTECTED]
18:25:35,212 DEBUG [PortletInvoker] Performing Render Invocation
18:25:35,212 DEBUG [PortletInvoker] Dispatching to portlet servlet at:
/PlutoInvoker/blank
18:25:35,212 DEBUG [PortletConfigImpl] Resource Bundle requested: en_US
18:25:35,213 DEBUG [ResourceBundleFactory] Resource Bundle Created:
org.apache.shale.blank.Bundle
18:25:35,213 DEBUG [ResourceBundleFactory] Resource Bundle:
org.apache.shale.blank.Bundle : en_US requested.
18:25:35,284 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:35,285 DEBUG [PortletRequestImpl] Creating new portlet session...
18:25:35,285 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:35,285 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:35,296 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:35,296 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:35,304 DEBUG [JspStateManagerImpl] No tree structure state found in
client request
18:25:35,335 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=false)
18:25:35,364 DEBUG [PortletContextImpl] PortletRequestDispatcher requested:
/welcome.jsp
18:25:35,364 DEBUG [PortletRequestDispatcherImpl] Named dispatcher created.
18:25:35,364 DEBUG [PortletRequestDispatcherImpl] Request dispatcher
created.
18:25:35,364 DEBUG [RenderRequestImpl] Render request's included mode: true
18:25:35,364 DEBUG [RenderRequestImpl] No query string appended to the
included request.
18:25:37,235 DEBUG [PortletEntityImpl] Loading portlet definition for
context: /wiklet
18:25:37,235 DEBUG [PortletEntityImpl] Retrieved cross context:
[EMAIL PROTECTED]
18:25:37,634 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=false)
18:25:37,654 INFO  [WelcomeBean] >>>>>>>>> constructing WelcomeBean
18:25:37,686 INFO  [WelcomeBean] >>>>>>>>> getTimestamp: null
18:25:37,733 INFO  [MyfacesConfig] No context init parameter '
org.apache.myfaces.PRETTY_HTML' found, using default value true
18:25:37,733 INFO  [MyfacesConfig] No context init parameter '
org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
18:25:37,733 INFO  [MyfacesConfig] No context init parameter '
org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
18:25:37,733 INFO  [MyfacesConfig] No context init parameter '
org.apache.myfaces.AUTO_SCROLL' found, using default value false
18:25:37,744 DEBUG [RenderRequestImpl] Render request's included mode: false
18:25:37,750 DEBUG [PortletRequestImpl] Retreiving portlet session
(create=true)
18:25:37,752 DEBUG [PortletContainerImpl] Portlet Container [Pluto Portal
Driver]: Portlet rendered for: blank
18:25:37,753 DEBUG [PortalDriverServlet] Render request processed.

Reply via email to