Foren

JSF portlet development and deployment

Ahmed Elbassel, geändert vor 12 Jahren.

JSF portlet development and deployment

Junior Member Beiträge: 41 Beitrittsdatum: 05.01.12 Neueste Beiträge
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.
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
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/
Ahmed Elbassel, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 41 Beitrittsdatum: 05.01.12 Neueste Beiträge
Gregory Amerson,Thank you very much.
thumbnail
Jubril Oyesiji, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 35 Beitrittsdatum: 09.02.12 Neueste Beiträge
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
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
Hi Jubril,

What version of the Liferay IDE plugins are you using?
thumbnail
Jubril Oyesiji, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 35 Beitrittsdatum: 09.02.12 Neueste Beiträge
Hello,
I am using eclipse_Liferay_IDE_1.5.0_v201202080242-linux-x86_64.tar.gz
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
Can you send me an example JSF portlet project that you are having trouble deploying and I can try to replicate on my side.
thumbnail
Jubril Oyesiji, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 35 Beitrittsdatum: 09.02.12 Neueste Beiträge
Please find attached project as a zip file
X Man, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 41 Beitrittsdatum: 05.01.12 Neueste Beiträge
Hello every one
I think problem solved, you can download the attached file and follow the steps to be able to create JSF portlet
thumbnail
William Gosse, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
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.
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
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
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
Hey Oli,

Right now GA2 is schedule for March 23rd.
Oliver Bayer, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
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.
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Junior Member Beiträge: 41 Beitrittsdatum: 05.01.12 Neueste Beiträge
Good Job
thumbnail
William Gosse, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
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?
thumbnail
Gregory Amerson, geändert vor 12 Jahren.

RE: JSF portlet development and deployment

Liferay Legend Beiträge: 1123 Beitrittsdatum: 16.02.10 Neueste Beiträge
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.