Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
JSF portlet - /*. Please define a different url-pattern. ilke Muhtaroglu February 14, 2011 10:19 PM
RE: JSF portlet - /*. Please define a different url-pattern. Gregory Amerson February 15, 2011 7:29 AM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin February 15, 2011 7:23 AM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin February 15, 2011 12:27 PM
RE: JSF portlet - /*. Please define a different url-pattern. ilke Muhtaroglu February 19, 2011 2:24 AM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin February 19, 2011 2:35 AM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich April 29, 2011 12:39 PM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin April 29, 2011 3:01 PM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich April 29, 2011 3:27 PM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin April 29, 2011 3:30 PM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich April 29, 2011 6:44 PM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich May 1, 2011 11:28 AM
RE: JSF portlet - /*. Please define a different url-pattern. Jörn Kolberg May 26, 2011 5:58 AM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich May 26, 2011 9:33 AM
RE: JSF portlet - /*. Please define a different url-pattern. Luke McLean June 9, 2011 8:04 PM
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich July 10, 2011 5:18 PM
RE: JSF portlet - /*. Please define a different url-pattern. Sergio Andres Valdez Valdez September 9, 2011 7:19 AM
RE: JSF portlet - /*. Please define a different url-pattern. William Gosse February 15, 2012 2:38 PM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin February 15, 2012 2:43 PM
RE: JSF portlet - /*. Please define a different url-pattern. William Gosse February 15, 2012 3:30 PM
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin February 15, 2012 4:10 PM
RE: JSF portlet - /*. Please define a different url-pattern. Debasis Padhi July 25, 2012 10:46 PM
ilke Muhtaroglu
JSF portlet - /*. Please define a different url-pattern.
February 14, 2011 10:19 PM
Answer

ilke Muhtaroglu

Rank: Regular Member

Posts: 223

Join Date: May 12, 2009

Recent Posts

Hi,

after generating a JSF portlet, I can view a page, but when I am about to go to a next page. I get this error." /*. Please define a different url-pattern."

this is what I have at deployed portlets web.xml :

 1
 2    <servlet>
 3        <servlet-name>Faces Servlet</servlet-name>
 4        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
 5        <load-on-startup>1</load-on-startup>
 6    </servlet>
 7    <servlet>
 8        <servlet-name>phoneBookAdmin</servlet-name>
 9        <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
10        <init-param>
11            <param-name>portlet-class</param-name>
12            <param-value>org.portletfaces.bridge.GenericFacesPortlet</param-value>
13        </init-param>
14        <load-on-startup>0</load-on-startup>
15    </servlet>
16    <servlet-mapping>
17        <servlet-name>phoneBookAdmin</servlet-name>
18        <url-pattern>/phoneBookAdmin/*</url-pattern>
19    </servlet-mapping>




 1
 2
 3
 4
 506:00:45,422 ERROR [jsp:154] javax.faces.FacesException: The FacesServlet cannot have a url-pattern of /*.  Please define a different url-pattern.
 6    at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:325)
 7    at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:150)
 8    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96)
 9    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
10    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
11    at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:241)
12    at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:194)
13    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
14    at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
15    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:101)
16    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
17    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
18    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
19    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
20    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
21    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
22    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
23    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
24    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:638)
25    at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:723)
Gregory Amerson
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2011 7:29 AM
Answer

Gregory Amerson

LIFERAY STAFF

Rank: Liferay Master

Posts: 918

Join Date: February 16, 2010

Recent Posts

Hi ilke,

I'm going to ask our resident JSF expert, Neil, on this one. I'll let you know. *Update* Neil responded below.
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2011 7:23 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

I've seen this problem reported before but I've never been able to reproduce it. Have you tried restarting your Liferay+Tomcat bundle?
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2011 12:27 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

A colleague of mine happened to run into this very same error today. It was caused by the absence of a basic WEB-INF/faces-config.xml file in the portlet, like this:


1<?xml version="1.0" encoding="UTF-8"?>
2<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
3    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
5    version="2.0">
6
7</faces-config>


One might think that this file is optional with JSF 2.0, but apparently Mojarra has a dependency on the existence of this file for the FaceletViewHandlingStrategy to get instantiated properly.
ilke Muhtaroglu
RE: JSF portlet - /*. Please define a different url-pattern.
February 19, 2011 2:24 AM
Answer

ilke Muhtaroglu

Rank: Regular Member

Posts: 223

Join Date: May 12, 2009

Recent Posts

Hi Neil,

I didnt test properly what you have said but here what is written at the default generated faces-config.xml



 1
 2
 3
 4<?xml version="1.0"?>
 5<faces-config
 6    version="2.0"
 7    xmlns="http://java.sun.com/xml/ns/javaee"
 8    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 9    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
10>




This is very same wtih what you have posted only, <... encoding="UTF-8"?> is missing.

...so faces-config.xml is already available inside the portlet and the header is similar. I will debug more and let you know if I can find anything valuable.

for your information

ilke
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
February 19, 2011 2:35 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

Are your Facelet views using the .xhtml extension or the .jspx extension? Someone at the portletfaces.org forums recently reported that they were using .jspx and seeing the problem. I think adding the following to web.xml would fix it:

1<context-param>
2<param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
3<param-value>*.jspx</param-value>
4</context-param>


For reference, see:

http://www.portletfaces.org/community/forums/-/message_boards/message/52573#_19_message_52684
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
April 29, 2011 12:39 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

I've run into the same exception during the call to "facesLifecycle.render(facesContext);" Unfortunately, adding FACELETS_VIEW_MAPPINGS did not fix things. I am using .xhtml files, not .jspx, but changed the extension in the directive.

Suggestions? Thanks.
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
April 29, 2011 3:01 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

The only suggestion I can make is that you start with the Example JSF portlet, and then slowly make changes to it, testing often, until it contains the functionality of the portlet you're trying to develop:
http://www.portletfaces.org/projects/portletfaces-bridge/examples/jsf2-portlet
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
April 29, 2011 3:27 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

I am starting from a different point. I have a working portlet using ICEFaces 1.8.2 and LR 6.0.6, and trying to make modifications to upgrade to ICEFaces 2.0. It's code that's already been deployed.
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
April 29, 2011 3:30 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

In that case I would recommend that you checkout the web.xml file from the Example ICEfaces2 compatibility portlet and compare it with the one you're migrating:
http://www.portletfaces.org/projects/portletfaces-bridge/examples/icefaces2-compat-portlet
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
April 29, 2011 6:44 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

Thanks, good suggestion. The only problem was that the example had some JBoss-specific configuration, but I worked around that when replacing both web.xml and faces-config.xml with the copies from the example.

Unfortunately, I still get the same exception (in a slightly different place), so I'm unclear what to change in this pretty minimal configuration. Here's the exception:
 1javax.faces.FacesException: The FacesServlet cannot have a url-pattern of /*.  Please define a different url-pattern.
 2    at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:330)
 3    at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
 4    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
 5    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
 6    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 7    at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:327)
 8    at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:181)
 9    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
10    at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
11    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:101)
12...

I'm still open to suggestions, since these configuration files are about as simple or as unchanged as I can make them.

web.xml:
 1<?xml version="1.0" encoding="UTF-8"?>
 2
 3<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
 5
 6    <!-- Instruct JBoss AS to look for the JSF implementation within the portlet WAR. -->
 7    <context-param>
 8        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
 9        <param-value>true</param-value>
10    </context-param>
11    <!-- Set the JSF 2 PROJECT_STAGE to Development so that the JSF implementation will do the following at runtime: -->
12    <!-- 1. Log more verbose messages. -->
13    <!-- 2. Render tips and/or warnings in the view markup. -->
14    <!-- 3. Cause the default ExceptionHandler to display a developer-friendly error page. -->
15    <context-param>
16        <param-name>javax.faces.PROJECT_STAGE</param-name>
17        <param-value>Development</param-value>
18    </context-param>
19    <!-- Instruct Mojarra to utilize JBoss-EL instead of the EL implementation provided by the servlet container. -->
20    <!-- COMMENTED OUT
21    <context-param>
22        <param-name>com.sun.faces.expressionFactory</param-name>
23        <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
24    </context-param>
25    -->
26    <!-- Instruct ICEfaces to abstain from adding a random query parameter to resource URLs (which it does by default -->
27    <!-- in order to prevent caching of JavaScript resources like bridge.js in a servlet-based webapp). -->
28    <context-param>
29        <param-name>org.icefaces.uniqueResourceURLs</param-name>
30        <param-value>false</param-value>
31    </context-param>
32    <!-- The following listener is required for deployment on JBoss AS. See BRIDGE-183 for more info. -->
33    <listener>
34        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
35    </listener>
36    <!-- Although the FacesServlet will not be invoked by any portlet requests, it is required to initialize JSF. -->
37    <servlet>
38        <servlet-name>Faces Servlet</servlet-name>
39        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
40        <load-on-startup>1</load-on-startup>
41    </servlet>
42    <!-- BEGIN: Compatibility with ICEfaces 1.8 components -->
43    <servlet>
44        <servlet-name>Resource Servlet</servlet-name>
45        <servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
46        <load-on-startup>1</load-on-startup>
47    </servlet>
48    <servlet-mapping>
49        <servlet-name>Resource Servlet</servlet-name>
50        <url-pattern>/xmlhttp/*</url-pattern>
51    </servlet-mapping>
52    <servlet-mapping>
53        <servlet-name>Faces Servlet</servlet-name>
54        <url-pattern>/icefaces/*</url-pattern>
55    </servlet-mapping>
56    <!-- END: Compatibility with ICEfaces 1.8 components -->
57    <!-- Setup the mail session so that it can be shared by the portlet WAR. -->
58    <resource-ref>
59        <res-ref-name>mail/MailSession</res-ref-name>
60        <res-type>javax.mail.Session</res-type>
61        <res-auth>Container</res-auth>
62        <res-sharing-scope>Shareable</res-sharing-scope>
63    </resource-ref>
64    <!-- Prevent direct access to Facelet view XHTML by the userAgent (browser). -->
65    <security-constraint>
66        <web-resource-collection>
67            <web-resource-name>Facelet View XHTML</web-resource-name>
68            <url-pattern>*.xhtml</url-pattern>
69        </web-resource-collection>
70        <auth-constraint>
71            <role-name>nobody</role-name>
72        </auth-constraint>
73    </security-constraint>
74    <security-role>
75        <role-name>nobody</role-name>
76    </security-role>
77</web-app>

faces-config.xml:
 1<?xml version="1.0" encoding="UTF-8"?>
 2<faces-config
 3    xmlns="http://java.sun.com/xml/ns/javaee"
 4    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
 6    version="2.0">
 7
 8 <managed-bean>
 9  <managed-bean-name>Bean1</managed-bean-name>
10  <managed-bean-class>com.something.Bean</managed-bean-class>
11  <managed-bean-scope>request</managed-bean-scope>
12 </managed-bean>
13 <application>
14  <message-bundle>content.labels</message-bundle>
15 </application>
16</faces-config>
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
May 1, 2011 11:28 AM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

Did a bit more research, and there are only two places that throw this exception (context is FacesContext):
1        if ("/*".equals(RequestStateManager.get(context, RequestStateManager.INVOCATION_PATH))) {
2            throw new FacesException(MessageUtils.getExceptionMessageString(
3                  MessageUtils.FACES_SERVLET_MAPPING_INCORRECT_ID));
4        }
It's not clear to me how or why this would get set.

Also seeing the following message in the log:
1Apr 30, 2011 10:27:00 PM javax.faces.FactoryFinder$FactoryManagerCacheKey <init>
2WARNING: Multiple JSF Applications found on same ClassLoader.  Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
Jörn Kolberg
RE: JSF portlet - /*. Please define a different url-pattern.
May 26, 2011 5:58 AM
Answer

Jörn Kolberg

Rank: New Member

Posts: 6

Join Date: May 26, 2011

Recent Posts

Hi there,
have you ever managed to solve the problem? We are running into the same hassle with Weblogic 10.3.3 and Liferay 5.2.8.
Any solutions? All I can offer is the following log entry :-)

WARNING: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
May 26, 2011 2:50:59 PM javax.faces.FactoryFinder$FactoryManagerCacheKey <init>
WARNING: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
14:50:59,785 ERROR [jsp:157] javax.faces.FacesException: The FacesServlet cannot have a url-pattern of /*. Please define a different url-pattern.
at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:330)
at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:422)
at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:182)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:66)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)


Cheers, Jörn
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
May 26, 2011 9:33 AM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

Unfortunately, no. All I ever get out of the experts is try this example; no, try this one instead. I've looked at every one, to no avail.

I've been developing software for a long time and I'm not particularly dense (I adopt many new technologies each year), but this has been one of the more frustrating exercises in my career. Great, people who wrote some of the software can write examples that work. Others not close to the UI/portal/bridge projects (like me) run into these sorts of weird errors.

Whenever I adopt a technology there is tradeoff between learning/deploying the technology and getting the real work done (developing the application). If things aren't working with a technology, there comes a point where you have to decide whether to invest more time and effort into the current solution or investigate an entirely different approach. I'm about at that point.
Luke McLean
RE: JSF portlet - /*. Please define a different url-pattern.
June 9, 2011 8:04 PM
Answer

Luke McLean

Rank: Junior Member

Posts: 46

Join Date: August 15, 2007

Recent Posts

I had this problem and it took me a day to solve.

The problem is that I was still referencing the portlet in the portlet.xml like this:

<portlet>
<portlet-name>composite_portlet</portlet-name>
<display-name>Composite Portlet</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/xhtml/portlet/composite/main.iface</value>
</init-param>
<init-param>
<name>javax.portlet.faces.defaultViewId.edit</name>
<value>/xhtml/portlet/composite/config.iface</value>
</init-param>
.... etc

I changed it to refer to the file with the xhtml extension and the error went away... I tried everything else I could find on the internet and NOTHING else worked (all dead ends)

<portlet>
<portlet-name>composite_portlet</portlet-name>
<display-name>Composite Portlet</display-name>
<portlet-class>org.portletfaces.bridge.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/xhtml/portlet/composite/main.xhtml</value>
</init-param>
<init-param>
<name>javax.portlet.faces.defaultViewId.edit</name>
<value>/xhtml/portlet/composite/config.xhtml</value>
</init-param>
.... etc
Bob Dietrich
RE: JSF portlet - /*. Please define a different url-pattern.
July 10, 2011 5:18 PM
Answer

Bob Dietrich

Rank: Regular Member

Posts: 212

Join Date: May 15, 2005

Recent Posts

After several months on other tasks I created an entirely new portlet from scratch using JSF 2.0, no other libraries (no ICEFaces), and the minimal faces-config.xml as above, I ran into exactly this same error.

Changing the extension to .xhtml fixed the problem.

Thanks a million, Luke!
Sergio Andres Valdez Valdez
RE: JSF portlet - /*. Please define a different url-pattern.
September 9, 2011 7:19 AM
Answer

Sergio Andres Valdez Valdez

Rank: New Member

Posts: 5

Join Date: April 11, 2011

Recent Posts

This was the solution for me, thanks a lot.
William Gosse
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2012 2:38 PM
Answer

William Gosse

Rank: Regular Member

Posts: 108

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.
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2012 2:43 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

The view-template problem might be an indicator of a bug in the Liferay Plugins SDK for newly created JSF portlets. See LPS-25140
William Gosse
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2012 3:30 PM
Answer

William Gosse

Rank: Regular Member

Posts: 108

Join Date: July 4, 2010

Recent Posts

Again adding a new jsf portlet to an existing jsf porlet project sets the init-param name to javax.portlet.faces.defaultViewId.view. So are you saying that this is not fully correct as well?
Neil Griffin
RE: JSF portlet - /*. Please define a different url-pattern.
February 15, 2012 4:10 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2097

Join Date: July 26, 2005

Recent Posts

javax.portlet.faces.defaultViewId.view is correct
Debasis Padhi
RE: JSF portlet - /*. Please define a different url-pattern.
July 25, 2012 10:46 PM
Answer

Debasis Padhi

Rank: Junior Member

Posts: 55

Join Date: March 23, 2012

Recent Posts

Thanks This is the exact solution ....
I did the change in my portlet.xml file
inside the <init-param>
the name parameter should be
<name>javax.portlet.faces.defaultViewId.view</name>