Announcement Announcement Module
Collapse
No announcement yet.
swf-booking-portlet-faces samples is not working on Liferay 6.0.4 with tomcat 6.0.26 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • swf-booking-portlet-faces samples is not working on Liferay 6.0.4 with tomcat 6.0.26

    All,

    I am new to portlet development. So, I started evaluating the spring webflow 2.2.1 framework technology stack.

    I am having problem in executing the swf-booking-portlet-faces sample supplied as part of spring webflow 2.2.1 on Portal container Liferay 6.0.4 bundeled with tomcact 6.0.26.

    This example is working fine with pluto container as stated in the document. Since example is budleged with pluto portal driver, so when exeucting in Liferay gave error saying pluto driver not found. So, I commented out the section and add following configuration in the web.xml and added liferay-portlet.xml and liferay-display.xml files nessary for liferay.
    Now, I am not seeing any errors while starting the portal container. Howwever, not seeing this portlet available to add it to the portal page.

    Following are configuration entries
    Web.xml
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    	version="2.4">
    
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>
    			/WEB-INF/config/application-config.xml,/WEB-INF/config/hotelbooking-portlet-config.xml
    		</param-value>
    	</context-param>
    
    	<!-- Use JSF view templates saved as *.xhtml, for use with Facelets -->
    	<context-param>
    		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    		<param-value>.xhtml</param-value>
    	</context-param>
    
    	<!-- Enables special Facelets debug output during development -->
    	<context-param>
    		<param-name>facelets.DEVELOPMENT</param-name>
    		<param-value>true</param-value>
    	</context-param>
    
    	<!-- Causes Facelets to refresh templates during development -->
    	<context-param>
    		<param-name>facelets.REFRESH_PERIOD</param-name>
    		<param-value>1</param-value>
    	</context-param>
    
    	<!-- <listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener> -->
    
    	<!--<context-param>
    		<param-name>webAppRootKey</param-name>
    		<param-value>swf-booking-faces</param-value>
    	</context-param>--> 
    	<!-- <context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/config/hotelbooking-portlet-config.xml</param-value>
    	</context-param> --> 
    	
    	<context-param>
    		<param-name>log4jConfigLocation</param-name>
    		<param-value>/WEB-INF/classes/log4j.properties</param-value>
    	</context-param>
    	
    	<!-- <listener>
    		<listener-class>org.springframework.web.util.WebAppRootListener</listener-class>
    	</listener> -->
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    
    	<!-- Generated Portlet Wrapper Servlet for Apache Pluto deployment -->
    	<!--
    		<servlet> <servlet-name>swf-booking-faces</servlet-name>
    		<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
    		<init-param> <param-name>portlet-name</param-name>
    		<param-value>swf-booking-faces</param-value> </init-param>
    		<load-on-startup>1</load-on-startup> </servlet> <servlet-mapping>
    		<servlet-name>swf-booking-faces</servlet-name>
    		<url-pattern>/PlutoInvoker/swf-booking-faces</url-pattern>
    		</servlet-mapping>
    	-->
    
    
    	<!--
    		Just here so the JSF implementation can initialize, *not* used at
    		runtime
    	-->
    	<servlet>
    		<servlet-name>Faces Servlet</servlet-name>
    		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    
    	<!-- Just here so the JSF implementation can initialize -->
    	<servlet-mapping>
    		<servlet-name>Faces Servlet</servlet-name>
    		<url-pattern>*.faces</url-pattern>
    	</servlet-mapping>
    
    </web-app>
    portlet.xml
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <portlet-app
    	xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
    	version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    
    	<portlet>
    		<portlet-name>swf-booking-faces</portlet-name>
    		<display-name>Spring Webflow Booking Faces</display-name>
    
    		<portlet-class>
    			org.springframework.web.portlet.DispatcherPortlet
    		</portlet-class>
    
    		<init-param>
    			<name>contextConfigLocation</name>
    			<value>
    				/WEB-INF/config/hotelbooking-portlet-config.xml
    			</value>
    		</init-param>
    
    		<init-param>
    			<name>viewRendererUrl</name>
    			<value>/WEB-INF/servlet/view</value>
    		</init-param>
    
    		<expiration-cache>0</expiration-cache>
    
    		<supports>
    			<mime-type>text/html</mime-type>
    			<portlet-mode>view</portlet-mode>
    		</supports>
    
    			
    				<portlet-info>
    			<title>Spring Webflow Booking Faces</title>
    		</portlet-info>
    	</portlet>
    </portlet-app>
    liferay-display.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.0.0//EN" "http://www.liferay.com/dtd/liferay-display_6_0_0.dtd">
    
     <display>
     	<category name="swffaces">
     		<portlet id="swf-booking-faces" />
     	</category>
     </display>
    liferay-portlet.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_2_0.dtd">
    
     <liferay-portlet-app>
     	<portlet>
     		<portlet-name>swf-booking-faces</portlet-name>
     		<instanceable>true</instanceable>
     	</portlet>
     </liferay-portlet-app>
    Probably, I might misssed some configurations necessary for the porlet to appear. Please help me to up and running this example in liferay portal container 6.0.4.

    Thanks,
    Sarat

  • #2
    Any finding? We are attempting to do the same thing of deploying a Spring Web Flow portlet to a Liferay portal.

    Comment


    • #3
      It works!

      I managed to deploy the sample booking-portlet-faces.war in Spring Web Flow 2.2.1 release to Liferay-6.1.0.

      Here are the steps,
      1. Add liferay-portlet.xml, liferay-plugin-package.properties, liferay-display.xml files to the WEB-INF folder.
      2. Change the DTD definition in faces-config.xml from version 1.0 to 1.1
      3. remove the pluto servlet declaration in web.xml.

      And it works!

      Comment


      • #4
        Originally posted by totempole View Post
        I managed to deploy the sample booking-portlet-faces.war in Spring Web Flow 2.2.1 release to Liferay-6.1.0.

        Here are the steps,
        1. Add liferay-portlet.xml, liferay-plugin-package.properties, liferay-display.xml files to the WEB-INF folder.
        2. Change the DTD definition in faces-config.xml from version 1.0 to 1.1
        3. remove the pluto servlet declaration in web.xml.

        And it works!
        Can you provide the files for us. I cant't get it work.

        Comment

        Working...
        X