|
Hi all,
I’m trying to merge Alfresco with Jetspeed2, but I’m experiencing lot of trouble since I don’t know very well what I should modify and how… =/ I’m kind of newbie to this things
I’ve seen that there is a portlet version of Alfresco for Liferay (in fact, there is a bundle containing Tomcat+Liferay+Alfresco) so I thought I could modify the xml descriptors in order to run Alfresco over J2. Alfresco is a jsf portlet so I took a look on jsf demo that comes out-of-the-box with J2, but I didn’t get too much of it…
Differences I’ve seen: - faces-config.xml: beans, navigation rules, etc are splitted up in different xml files (while “jsf demo” has all these things packed in the same “faces-config.xml”). The “faces-config.xml” only defines a factory that I removed (I’ve asked also this issue in Alfresco’s forum and told me maybe this factory is not necessary… there is also a portlet for JBoss that does not need any factory) - web.xml: there is an additional listener (that I think it’s the main source for my problems)… something called PortletContextListener in Liferay that I don’t what is it for… I’ve tried to replace it with “Jetspeed engine” or “PortletFacesContextImpl.class” (from the J2’s jsf bridge, and also include the jsf bridge jar in the war file) but with no luck (see lines 89-92 in “web.xml.txt”) - web.xml: I’ve made AlfrescoClient portlet to run against JetspeedServletContainer since I understood this is the class in J2 that manages MVC for portlet applications (see lines 106-115 in “web.xml.txt”). Though I have doubts regarding initial parameter of that servlet
I think I’ve managed to deploy “alfresco.war” (in fact, some directory structure is created) but J2 “dies” in the process… without leaving any log message…
I’m keen on J2 (rather than Liferay) so I would like to keep working over J2…
Any help or suggestion would be very much appreciated… =)
Thanks and regards, Enrique
PS: sorry for my English PS2: I attach the xml descriptors
|
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd"><faces-config xmlns="http://java.sun.com/JSF/Configuration"> <factory> <!-- <faces-context-factory>com.liferay.util.jsf.apache.myfaces.context.MyFacesContextFactoryImpl</faces-context-factory>--> <!-- <faces-context-factory>org.apache.myfaces.context.FacesContextFactoryImpl</faces-context-factory>--> </factory> </faces-config>
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
id="alfresco"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0">
<portlet>
<description>Alfresco Client Portlet</description>
<portlet-name>AlfrescoClient</portlet-name>
<portlet-class>org.alfresco.web.app.portlet.AlfrescoFacesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/jsp/login.jsp</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-mode>HELP</portlet-mode>
</supports>
<portlet-info>
<title>Alfresco Client Portlet</title>
<short-title>alfresco-client-portlet</short-title>
</portlet-info>
</portlet>
</portlet-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>alfresco</display-name>
<description>Alfresco Web Client</description>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
<description>This is an EXPERIMENTAL feature, so leave it off
for now!</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<description>
If true, rendered HTML code will be formatted, so that
it is "human readable".
i.e. additional line separators and whitespace will be
written, that do not
influence the HTML code.
Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>false</param-value>
<description>
If true, a javascript function will be rendered that is
able to restore the
former vertical scroll on every request. Convenient
feature if you have pages
with long lists and you do not want the browser page to
always jump to the top
if you trigger a link or button action that stays on
the same page.
Default: "false"
</description>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:alfresco/web-client-application-context.xml
classpath:web-services-application-context.xml
classpath:alfresco/application-context.xml
</param-value>
<description>Spring config file locations</description>
</context-param>
<filter>
<filter-name>Authentication Filter</filter-name>
<filter-class>org.alfresco.web.app.servlet.AuthenticationFilter</filter-class>
</filter>
<filter>
<filter-name>WebDAV Authentication Filter</filter-name>
<filter-class>org.alfresco.repo.webdav.auth.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Authentication Filter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>WebDAV Authentication Filter</filter-name>
<url-pattern>/webdav/*</url-pattern>
</filter-mapping>
<listener>
<!--<listener-class>com.liferay.portal.shared.servlet.PortletContextListener</listener-class>-->
<!--
<listener-class>org.apache.portals.bridges.jsf.PortletFacesContextImpl</listener-class>-->
</listener>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.alfresco.web.app.ContextListener</listener-class>
</listener>
<servlet>
<servlet-name>AlfrescoClient</servlet-name>
<!--<servlet-class>com.liferay.portal.shared.servlet.PortletServlet</servlet-class>-->
<servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
<init-param>
<param-name>portlet-class</param-name>
<param-value>org.alfresco.web.app.portlet.AlfrescoFacesPortlet</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.AlfrescoFacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>uploadFile</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.UploadFileServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>downloadContent</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.DownloadContentServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>externalAccess</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.ExternalAccessServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>templateContent</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.TemplateContentServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>commandServlet</servlet-name>
<servlet-class>org.alfresco.web.app.servlet.CommandServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>axis</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet>
<servlet-name>WebDAV</servlet-name>
<servlet-class>org.alfresco.repo.webdav.WebDAVServlet</servlet-class>
<init-param>
<param-name>store</param-name>
<param-value>workspace://SpacesStore</param-value>
</init-param>
<init-param>
<param-name>rootPath</param-name>
<param-value>/app:company_home</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AlfrescoClient</servlet-name>
<url-pattern>/AlfrescoClient/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>uploadFile</servlet-name>
<url-pattern>/uploadFileServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>downloadContent</servlet-name>
<url-pattern>/download/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>externalAccess</servlet-name>
<url-pattern>/navigate/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>templateContent</servlet-name>
<url-pattern>/template/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>commandServlet</servlet-name>
<url-pattern>/command/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>axis</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>WebDAV</servlet-name>
<url-pattern>/webdav/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Tag libraries -->
<taglib>
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/portlet.tld</taglib-location>
</taglib>
</web-app>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
