Hi,

I am new to the Struts Framework. I am developing a Struts based JSR 
168 portlet on WepSphere Portal 5.1 platform. I needed some help 
with an error I am getting in generating Portlet URI's within the 
struts Action class. I am using this method to generate struts 
action url mentioned in the Forwards and Redirect option of this 
page in WP 5.1 info center. 
http://publib.boulder.ibm.com/infocenter/wp51help/index.jsp?
topic=/com.ibm.wp.zos.doc/wps/wpstrsource.html#forwards 

PortletApiUtils portletUtils = PortletApiUtils.getUtilsInstance();
Object portletURI = null;
if (portletUtils != null)
{
// when run in a portlet use this execution path.
Object pResponse = portletUtils.getPortletResponse( 
(HttpServletRequest) req
uest );
try {
portletURI = portletUtils.createPortletURIWithStrutsURL(request, 
url);
// don't need to call response.encodeURL, the portletURI.toString 
takes care
 of that.
}
channel.setLocation(portletURI.toString());
Here channel is  a component within my portlet which has link to a 
struts ac
tion...

I am getting the following error when i try to run the jsr 168 
portlet within RAD WP 5.1 test environment..

[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R 
java.lang.ClassCastException: 
com.ibm.wps.struts.pluto.base.WpsStrutsActionRequestWrapper
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.wps.standard.struts.portlet.PortletApiUtilsImpl.createPortlet
URI(PortletApiUtilsImpl.java:193)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.wps.standard.struts.portlet.PortletApiUtilsImpl.createPortlet
URI(PortletApiUtilsImpl.java:139)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.wps.standard.struts.portlet.PortletApiUtilsImpl.createPortlet
URIWithStrutsURL(PortletApiUtilsImpl.java:243)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.portal.struts.common.PortletApiUtils.createPortletURIWithStru
tsURL(PortletApiUtils.java:260)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.fmo.targetcontent.web.action.ViewCMAAction.createCMAFormTree
(ViewCMAAction.java:191)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.fmo.targetcontent.web.action.ViewCMAAction.execute
(ViewCMAAction.java:149)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.portal.struts.portlet.WpRequestProcessor.processActionPerform
(WpRequestProcessor.java:359)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:274)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.portal.struts.portlet.StrutsPortlet.processActionPerformed
(StrutsPortlet.java:1655)
[9/5/05 14:54:00:902 CDT] 32720e51 SystemErr     R      at 
com.ibm.portal.struts.portlet.StrutsPortlet.processAction
(StrutsPortlet.java:1387)

I am getting this classCastException at this line 

portletURI = portletUtils.createPortletURIWithStrutsURL(request, 
url);

I have taken the code to creating Portlet URI straight from the 
infocenter..
 I would appreciate any help or tips with this problem...
Regards



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to