Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Integrating jspx with facelet #4391

Open
vpnjain1991 opened this issue Dec 27, 2018 · 2 comments
Open

Integrating jspx with facelet #4391

vpnjain1991 opened this issue Dec 27, 2018 · 2 comments

Comments

@vpnjain1991
Copy link

vpnjain1991 commented Dec 27, 2018

I'm using jspx as view technology in JSF application.As JSF 2.2 is uses Facelet as default View Technology. So I have specified javax.faces.FACELETS_VIEW_MAPPINGS in web.xml.

web.xml

`

demo

index.html
index.jsp

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    <url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml,/WEB-INF/navigation-config.xml</param-value>
</context-param>
<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>none</param-value>
</context-param>
<context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
</context-param>
<context-param>
    <param-name>com.sun.faces.serializeServerState</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resourcesapplication</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Production</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.jspx</param-value>
</context-param>
**<context-param>
    <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
    <param-value>*.jspx</param-value>
</context-param>**
<context-param>
    <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
    <param-value>true</param-value>
</context-param>
<session-config>
    <session-timeout>30</session-timeout>
</session-config>

`

I'm using wildfly 15 (Full Profile) application server.But, while deploying I'm getting exception -

2018-12-26 18:35:20,009 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 157) Initializing Mojarra 2.3.5.SP2 for context '/jsfdemo'
2018-12-26 18:35:20,134 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 157) Critical error during deployment: : java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
at

...

2018-12-26 18:35:20,178 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "jsfdemo.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."jsfdemo.war".undertow-deployment" => "java.lang.RuntimeException: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically"}}
2018-12-26 18:35:20,180 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0021: Deploy of deployment "jsfdemo.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."jsfdemo.war".undertow-deployment" => "java.lang.RuntimeException: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.RuntimeException: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically
Caused by: java.lang.UnsupportedOperationException: UT010042: This method cannot be called from a servlet context listener that has been added programatically"}}
2018-12-26 18:35:20,263 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment jsfdemo.war (runtime-name: jsfdemo.war) in 82ms

@erickdeoliveiraleal
Copy link

mojarra issue tracker moved to: https://github.com/eclipse-ee4j/mojarra

@RanabirChakraborty
Copy link

RanabirChakraborty commented Jul 29, 2020

Any update on this issue? I'm still facing the same issue and I'm using wildfly 20 (Full Profile) application server

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants