hi !
i dont know, why i got no answer for my mail rom 03.03 - so two reasons 
are possible.
nobody or everybody knows the answer...
for everybody who is interisting to know how he
could start a struts-bridge-application in pluto rc1:

at the moment its only a temporary solution with the struts-demo

 go to file:
ServletContextProviderImpl in J2 project :-)

change line:
return 
((JetspeedPortletContext)portlet.getPortletContext()).getServletContext();

into
 return 
((PortletContextImpl)portlet.getPortletContext()).getServletContext();

you havt to import
import org.apache.pluto.core.impl.PortletContextImpl;

compile an build the j2 project.

find the
jetspeed-commons-2.0-M2-dev.jar (it includes the 
ServletContextProviderImpl)
and copy it into the web-inf/lib







web.xml:
                <servlet>
        <servlet-name>StrutsPortletDemo</servlet-name>
        <display-name>StrutsPortletDemo Wrapper</display-name>
        <description>Automated generated Portlet Wrapper</description>
 <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
        <init-param>
            <param-name>portlet-class</param-name>
 
<param-value>org.apache.portals.bridges.struts.StrutsPortlet</param-value>
        </init-param>
        <init-param>
            <param-name>portlet-guid</param-name>
            <param-value>struts-demo.StrutsPortletDemo</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>StrutsPortletDemo</servlet-name>
        <url-pattern>/StrutsPortletDemo/*</url-pattern>
    </servlet-mapping>
    <taglib>







Portlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app id="struts-demo" version="1.0">
  <portlet id="StrutsPortletDemo">
    <init-param>
      <name>ServletContextProvider</name>
 <value>org.apache.jetspeed.portlet.ServletContextProviderImpl</value>
    </init-param>
    <init-param>
      <name>ViewPage</name>
      <value>/Welcome.do</value>
    </init-param>
    <init-param>
      <name>HelpPage</name>
      <value>/Tour.do</value>
    </init-param>
    <portlet-name>StrutsPortletDemo</portlet-name>
    <display-name>Struts Portlet Demo</display-name>
    <description>This is the struts MailReader portlet demo</description>
 
<portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>
    <expiration-cache>-1</expiration-cache>
    <supports>
      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>
      <portlet-mode>HELP</portlet-mode>
    </supports>
    <portlet-info>
      <title>Struts MailReader Demo</title>
      <short-title>This is the short title</short-title>
      <keywords>Struts</keywords>
    </portlet-info>
  </portlet>
</portlet-app>





Portletentitieregsitry.xml

<application id="5">
                <definition-id>struts-demo</definition-id>
                <portlet id="1">
 <definition-id>struts-demo.StrutsPortletDemo</definition-id>
                    <preferences>
                        <pref-name>StrutsPortletDemo</pref-name>
                        <pref-value>StrutsPortletDemo</pref-value>
                        <read-only>false</read-only>
                    </preferences>
                </portlet>
    </application>









Pageregistry.xml

<?xml version="1.0"?>

<portal>

    <fragment name="navigation" 
class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation">
    </fragment>
 
    <fragment name="test" type="page">
        <navigation>
            <title>Test</title>
            <description>...</description>
        </navigation>

        <fragment name="row" type="row">

            <fragment name="col1" type="column">

                <fragment name="p1" type="portlet">
                    <property name="portlet" value="3.1"/>
                </fragment>

                <fragment name="p2" type="portlet">
                    <property name="portlet" value="5.1"/>
                </fragment>

            </fragment>

        </fragment>

    </fragment>

Reply via email to