Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
X Man
JSF portlet development and deployment
January 31, 2012 4:31 AM
Answer

X Man

Rank: Junior Member

Posts: 41

Join Date: January 5, 2012

Recent Posts

Hello
I developed JSF portlet but when I deploy it and add this portlet to a page I got this Exception:

12:11:13,154 ERROR [render_portlet_jsp:154] javax.faces.FacesException: The FacesServlet cannot have a url-pattern of /*. Please define a different url-pattern.

If I will change the URL, what will be this change?
How to solve this problem.
Gregory Amerson
RE: JSF portlet development and deployment
January 31, 2012 4:48 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

There have been some fixes applied in this area for JSF portlets. See this JIRA ticket: http://issues.liferay.com/browse/LPS-24723

If you look about half way down in the comments you can see Neil Griffin has posted with some workaround for the current version of portal 6.1.0. For 6.1.1 it will contain a fix but until then you can grab a nightly build of the portal. http://releases.liferay.com/portal/nightly/

Also there is a new nightly build of the IDE that also addresses some JSF portlet deployment issues here: http://releases.liferay.com/tools/ide/eclipse/indigo/nightly/
X Man
RE: JSF portlet development and deployment
February 1, 2012 6:31 AM
Answer

X Man

Rank: Junior Member

Posts: 41

Join Date: January 5, 2012

Recent Posts

Gregory Amerson,Thank you very much.
Jubril Adisa
RE: JSF portlet development and deployment
February 9, 2012 8:54 AM
Answer

Jubril Adisa

Rank: Junior Member

Posts: 35

Join Date: February 9, 2012

Recent Posts

Your suggestions did not work for me greg, i downloaded a new IDE and i also downloaded the 6.2 but still getting that same error emoticon
Gregory Amerson
RE: JSF portlet development and deployment
February 9, 2012 4:59 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Hi Jubril,

What version of the Liferay IDE plugins are you using?
Jubril Adisa
RE: JSF portlet development and deployment
February 9, 2012 5:30 PM
Answer

Jubril Adisa

Rank: Junior Member

Posts: 35

Join Date: February 9, 2012

Recent Posts

Hello,
I am using eclipse_Liferay_IDE_1.5.0_v201202080242-linux-x86_64.tar.gz
Gregory Amerson
RE: JSF portlet development and deployment
February 9, 2012 5:39 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Can you send me an example JSF portlet project that you are having trouble deploying and I can try to replicate on my side.
Jubril Adisa
RE: JSF portlet development and deployment
February 10, 2012 6:03 AM
Answer

Jubril Adisa

Rank: Junior Member

Posts: 35

Join Date: February 9, 2012

Recent Posts

Please find attached project as a zip file
Attachments: rotimi-portlet.zip (5,695.0k)
X Man
RE: JSF portlet development and deployment
February 15, 2012 2:52 AM
Answer

X Man

Rank: Junior Member

Posts: 41

Join Date: January 5, 2012

Recent Posts

Hello every one
I think problem solved, you can download the attached file and follow the steps to be able to create JSF portlet
Attachments: CreateLiferayJsfPortlet.docx (403.1k)
William Gosse
RE: JSF portlet development and deployment
February 15, 2012 2:12 PM
Answer

William Gosse

Rank: Expert

Posts: 276

Join Date: July 4, 2010

Recent Posts

The problem is caused by the fact the portlet.xml entry for the portlet that is generated when the project is originally created seems to be incorrect.
This original entry looks something like this:
<portlet>
<portlet-name>icetest3</portlet-name>
<display-name>Icetest3</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/xhtml/portletViewMode.xhtml</value>
</init-param>
...

Changing the name of the init-param to be the following corrects the issue:
<portlet>
<portlet-name>icetest3</portlet-name>
<display-name>Icetest3</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/xhtml/portletViewMode.xhtml</value>
</init-param>
...

This is why subsequent JSF portlets added to the project work correctly when deployed. Their init-parm name element is being correctly set to javax.portlet.faces.defaultViewId.view.
Gregory Amerson
RE: JSF portlet development and deployment
February 15, 2012 5:14 PM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Correct, and that issue of the initial jsf portlet that is created in the project has been fixed, so with 6.1.1 is release (6.1 GA2) it will include that fix.
Oliver Bayer
RE: JSF portlet development and deployment
February 16, 2012 1:19 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 889

Join Date: February 18, 2009

Recent Posts

Hi Greg,

thanks for the info.

Is there any release date set for the GA2 release? I've seen a lot of important/ critical bug fixes that's why I'm really looking forward to the next CE release.

Greets Oli
Gregory Amerson
RE: JSF portlet development and deployment
February 16, 2012 1:25 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

Hey Oli,

Right now GA2 is schedule for March 23rd.
Oliver Bayer
RE: JSF portlet development and deployment
February 16, 2012 1:50 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 889

Join Date: February 18, 2009

Recent Posts

Ok, thanks for the quick reply. I hope there will be no delays as the end of march is set as deadline for one of our projects emoticon.
Gregory Amerson
RE: JSF portlet development and deployment
February 16, 2012 1:54 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

You should be able to grab nightly builds as the time is approaching the release to get those fixes you need.

Of course, our very next release is the Enterprise Edition for 6.1. 6.1.10, which would of course contain those fixes, but that requires purchasing EE. This does include many other benefits if you haven't checked it out. There will also be a trial download of EE available once it releases next week. Otherwise you should be able to wait until GA2 for community edition.

Good luck with your launch!
X Man
RE: JSF portlet development and deployment
February 16, 2012 4:36 AM
Answer

X Man

Rank: Junior Member

Posts: 41

Join Date: January 5, 2012

Recent Posts

Good Job
William Gosse
RE: JSF portlet development and deployment
February 16, 2012 5:05 AM
Answer

William Gosse

Rank: Expert

Posts: 276

Join Date: July 4, 2010

Recent Posts

This would seem to be a fix that needs to be applied to the IDE and not to the 6.1 GA. It seems to be a simple matter of changing the init-parm name element in the portllet.xml file to be correctly set to javax.portlet.faces.defaultViewId.view when a new JSF porlet project is created in the IDE. Am I missing something here?
Gregory Amerson
RE: JSF portlet development and deployment
February 16, 2012 5:20 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1041

Join Date: February 16, 2010

Recent Posts

The project templates are from the SDK and the IDE just delegates to SDK to generate the project content so it takes a new SDK to get the fix. However, it is pretty easy to upgrade to the latest SDK even with the current version of the portal.