Hi,

Sun have recently released an update to their JSF implementation to allow it to 
work within the Sun JSR-168 Portal server. I have taken the implementation and 
modified the config files to allow it to work within the JBoss portal. I have 
also created a simple test JSF application to show the basic features of JSF in 
action for developers new to it. Both the code and JSPs are heavily commented 
to help you understand what is going on.

The JSF impl has a Portal class called com.sun.faces.portlet.FacesPortlet which 
is specified in the portlet.xml instead of your usual specific portal class. 
You then simply add a special init param to that portlet definition XML which 
specifies the start page of your JSF app:


  |         <init-param>
  |           <description>Portlet init page</description>
  |             <name>com.sun.faces.portlet.INIT_VIEW</name>
  |           <value>/login.jsp</value>
  |         </init-param>
  | 

then code up your JSF app as usual! Obviously the standard portlet rules apply 
in that your JSF JSP pages must adhere to standard portlet guidelines e.g. no 
HTML/HEAD tags etc. See the example for more info.

I have created a JBoss portlet page for this example - so it's also a good 
example of how to create the config files for a simple portlet and give it a 
separate page in JBoss portal.

http://www.kevs3d.co.uk/dev/jsf-test.zip

You launch the test app using something like the following URL:
http://localhost:8080/portal?page=jsftest

NOTE: I created this against the first JBoss Portal Alpha release - applogies 
if any config files etc. have changed since then, but i'm sure you can get it 
to work ;)

Hope this is useful to people,

Cheers,

Kev

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869162#3869162

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869162


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to