Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting JSF app to portlets using RAD

 
Gaurav Seth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I require to convert the JSF application to portlets.

Can someone provide some links / docs which talks about how to convert
the same.

I am using the following tech :

RAD v6.0 (ide)
websphere portal server v5.0

Thanks in advance,

Gseth
 
Gaurav Seth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was successfully able to do it, its pretty simple. Here are the steps :

1. Export the JSF project as WAR, including the source files.
2. Using RAD, create the new faces portlet (in my case 168) project.
3. Now, import the JSF App (.war) into Portlet Project.
4. Changes to be done in the following files
a. faces-config.xml - Add <factory>
<faces-context-factory>com.ibm.faces.context.PortletFacesContextFactoryImpl</faces-context-factory>
</factory>
and
<variable-resolver>com.ibm.faces.application.PortletVariableResolver</variable-resolver>
b. Web.xml - Remove the reference to FacesServlet.
c. Add taglib reference for portlets - http://java.sun.com/portlet for URL and /WEB-INF/tld/std-portlet.tld for location
d. Portlet.xml - Change the value of init param of �com.ibm.faces.portlet.page.view� to �/xyz.jsp� (entry point of App)
e. JSP files - add the following the tags and Remove HTML, Body, Head tags

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet efineObjects />

You are now all set to run the application on portal server.

- Gaurav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic