Thomas,
[EMAIL PROTECTED] wrote:
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:
3: everybody who does know the answer was too damn busy at the time ;-)
Although your solution will work, I can't say I recommend doing it like this. Once the Bridges subproject is finally started under Apache Portals (hopefully soon now...) I will provide portal specific providers for the ServletContextProvider. I could do so right now for Pluto except I don't want to bring its dependency into the bridges-common project just to be able to compile it.
I suggest the following solution until we can provide this through the Bridges Project: - Copy the jetspeed/commons/src/java/org/apache/jetspeed/portlet/ServletContextProviderImpl.java into a new package/folder of your own like: org.apache.portals.bridges.common.providers.pluto and adapt the package in the ServletContextProviderImpl.java file accordingly. - Make the changes you described below (replacing JetspeedPortletContext with PortletContextImpl) and replace import statement org.apache.jetspeed.container.JetspeedPortletContext with org.apache.pluto.core.impl.PortletContextImpl. Now you will have a Jetspeed independant ServletContextProvider for pluto. - Compile the class and put it into $Tomcat/shared/lib and you're done. And you *don't* have to use the jetspeed-commons-2.0-M2-dev.jar anymore.
Regards, Ate
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>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]