Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
JSF portlet - /*. Please define a different url-pattern. ilke Muhtaroglu 14 de febrero de 2011 22:19
RE: JSF portlet - /*. Please define a different url-pattern. Gregory Amerson 15 de febrero de 2011 7:29
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 15 de febrero de 2011 7:23
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 15 de febrero de 2011 12:27
RE: JSF portlet - /*. Please define a different url-pattern. ilke Muhtaroglu 19 de febrero de 2011 2:24
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 19 de febrero de 2011 2:35
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 29 de abril de 2011 12:39
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 29 de abril de 2011 15:01
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 29 de abril de 2011 15:27
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 29 de abril de 2011 15:30
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 29 de abril de 2011 18:44
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 1 de mayo de 2011 11:28
RE: JSF portlet - /*. Please define a different url-pattern. Jörn Kolberg 26 de mayo de 2011 5:58
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 26 de mayo de 2011 9:33
RE: JSF portlet - /*. Please define a different url-pattern. Luke McLean 9 de junio de 2011 20:04
RE: JSF portlet - /*. Please define a different url-pattern. Bob Dietrich 10 de julio de 2011 17:18
RE: JSF portlet - /*. Please define a different url-pattern. Sergio Andres Valdez Valdez 9 de septiembre de 2011 7:19
RE: JSF portlet - /*. Please define a different url-pattern. William Gosse 15 de febrero de 2012 14:38
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 15 de febrero de 2012 14:43
RE: JSF portlet - /*. Please define a different url-pattern. William Gosse 15 de febrero de 2012 15:30
RE: JSF portlet - /*. Please define a different url-pattern. Neil Griffin 15 de febrero de 2012 16:10
RE: JSF portlet - /*. Please define a different url-pattern. Debasis Padhi 25 de julio de 2012 22:46
ilke Muhtaroglu
JSF portlet - /*. Please define a different url-pattern.
14 de febrero de 2011 22:19
Respuesta

ilke Muhtaroglu

Ranking: Regular Member

Mensajes: 223

Fecha de incorporación: 12 de mayo de 2009

Mensajes recientes

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.
15 de febrero de 2011 7:29
Respuesta

Gregory Amerson

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 918

Fecha de incorporación: 16 de febrero de 2010

Mensajes recientes

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.
15 de febrero de 2011 7:23
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
15 de febrero de 2011 12:27
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
19 de febrero de 2011 2:24
Respuesta

ilke Muhtaroglu

Ranking: Regular Member

Mensajes: 223

Fecha de incorporación: 12 de mayo de 2009

Mensajes recientes

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.
19 de febrero de 2011 2:35
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
29 de abril de 2011 12:39
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
29 de abril de 2011 15:01
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
29 de abril de 2011 15:27
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
29 de abril de 2011 15:30
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
29 de abril de 2011 18:44
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
1 de mayo de 2011 11:28
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
26 de mayo de 2011 5:58
Respuesta

Jörn Kolberg

Ranking: New Member

Mensajes: 6

Fecha de incorporación: 26 de mayo de 2011

Mensajes recientes

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.
26 de mayo de 2011 9:33
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
9 de junio de 2011 20:04
Respuesta

Luke McLean

Ranking: Junior Member

Mensajes: 46

Fecha de incorporación: 15 de agosto de 2007

Mensajes recientes

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.
10 de julio de 2011 17:18
Respuesta

Bob Dietrich

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 15 de mayo de 2005

Mensajes recientes

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.
9 de septiembre de 2011 7:19
Respuesta

Sergio Andres Valdez Valdez

Ranking: New Member

Mensajes: 5

Fecha de incorporación: 11 de abril de 2011

Mensajes recientes

This was the solution for me, thanks a lot.
William Gosse
RE: JSF portlet - /*. Please define a different url-pattern.
15 de febrero de 2012 14:38
Respuesta

William Gosse

Ranking: Regular Member

Mensajes: 108

Fecha de incorporación: 4 de julio de 2010

Mensajes recientes

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.
15 de febrero de 2012 14:43
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

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.
15 de febrero de 2012 15:30
Respuesta

William Gosse

Ranking: Regular Member

Mensajes: 108

Fecha de incorporación: 4 de julio de 2010

Mensajes recientes

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.
15 de febrero de 2012 16:10
Respuesta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 2085

Fecha de incorporación: 26 de julio de 2005

Mensajes recientes

javax.portlet.faces.defaultViewId.view is correct
Debasis Padhi
RE: JSF portlet - /*. Please define a different url-pattern.
25 de julio de 2012 22:46
Respuesta

Debasis Padhi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 23 de marzo de 2012

Mensajes recientes

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>