wood burning stoves*
The moose likes JSF and the fly likes Converting JSF app to portlets using RAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Converting JSF app to portlets using RAD " Watch "Converting JSF app to portlets using RAD " New topic
Author

Converting JSF app to portlets using RAD

Gaurav Seth
Greenhorn

Joined: Jun 17, 2003
Posts: 2
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

Joined: Jun 17, 2003
Posts: 2
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Converting JSF app to portlets using RAD
 
Similar Threads
My JSF Portlet Tutorial
multipage portlet
development using websphere portal server
Cleared 399
jasper reports with portlets