Hello everyone,

I want to implement a portlet in jetspeed 2 + tomcat 5.0.28 + linux. My code can compile but I got a runtime error. The error is java.lang.ClassCastException: org.apache.jetspeed.container.JetspeedPortletConfig.The error part of my code is in the following.

Any help? Thanks.
Zhonghui

// PortletConfigImpl.java

package com.star.portlet;
import javax.portlet.PortletConfig;
public class PortletConfigImpl implements PortletConfig {
......
}

// StrutsPortlet.java

package com.star.portlet;
import javax.portlet.PortletConfig; public class StrutsPortlet extends GenericPortlet {


       private PortletConfigImpl _portletConfig;

public void init(PortletConfig config) throws PortletException {
super.init(config);
_portletConfig = (PortletConfigImpl)config; // Error: java.lang.ClassCastException


                _editAction = getInitParameter("edit-action");
                _helpAction = getInitParameter("help-action");
                _viewAction = getInitParameter("view-action");

                _copyRequestParameters = GetterUtil.get(
                        getInitParameter("copy-request-parameters"), true);
        }

......
}



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



Reply via email to