I want to update my JSF application to use Mojarra version 2.1.8. I added these lines into the POM file of the WAR package:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.1.8</version>
</dependency>
I also added the JSF repository. I package is build successfully with the Mojarra version 2.1.8. But when I open the GlassFish log I see that there is a Mojarra version 2.1.6 deployed. What am I missing? Do I need to make some configuration into the GlassFish server?
GlassFish itself already ships with JSF bundled which get by default classloading precedence over the one bundled in the webapp. You basically need to tell GlassFish to use the webapp bundled JSF instead.
Edit the webapp's /WEB-INF/glassfish-web.xml (or /WEB-INF/sun-web.xml if you're using one of the first GF3 versions) to add the following two entries:
<class-loader delegate="false" />
<property name="useBundledJsf" value="true" />
GlassFish will then use the webapp bundled JSF instead.
Alternatively, if you have full admin control over GlassFish, then you can also copy it in the /glassfish/modules directory, replacing the older version, so that it get applied on all webapps.
Related
I have a spring boot application and I want to always use the latest tomcat version, or even better the latest patched tomcat version of a given major and minor version:
F.e the latest version of 8 or the latest of 8.5. (like 8.5.32)
So, I would get the latest security patches if I rebuild my application.
I know I can manual give in one concrete version inside the properties.
But this would get fast outdated and I don't want to have to adjust this all the time manually.
If you use gradle then you can do it using this configuration:
compile('org.springframework.boot:spring-boot-starter-web') {
exclude module: "spring-boot-starter-tomcat"
}
compile 'org.apache.tomcat.embed:tomcat-embed-core:+'
compile 'org.apache.tomcat.embed:tomcat-embed-el:+'
compile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:+'
compile 'org.apache.tomcat.embed:tomcat-embed-websocket:+'
if you want to give specific version then use version+
if using maven it's pretty easy! This would get the latest from version 9.0.0 to 9.1.0.
pom.xml:
<properties>
<tomcat.version>[9.0,9.1)</tomcat.version>
</properties>
I am creating a hellow world jsf application using Wildfly 10, Wildfly is using its own jsf implementation instead of the jsf implementation jars that i have provided in the WEB-INF --> lib folder. how to tell wildfly to use my jars from lib folder?
Hi we have to use JBoss 6.4, But when I try to execute my code it fails due to missing method and works fine with JBoss 6.3 and JBoss 7
the setSSLContext method became available in v4.5 of HttpClientBuiler.
JBOSS 6.4 comes bundled with v4.3.6JBOSS 6.4 comes bundled with v4.3.6
So if I use version 4.5.2 via maven, does it override all the JBoss methods. If not what is the solution?
I want to use JBoss 6.4 only.
If you want to want to use any other version of components which is not bundled with specific Jboss release, then you can create it as module dependencies and use it. Make sure that you should exclude the particular version of components which bundle with JBoss inside jboss-deployment-structure.xml file
see the link: https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
I try to create a JSF app with richfaces but I get a ClassNotFoundException as soon as I deploy the application on JBoss 5.1 (Java 1.6) (I cannot switch another JBoss version)
I defined the dependencies in the pom as follows:
<dependencies>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>${org.richfaces.bom.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
</dependency>
<dependency>
<groupId>org.richfaces.core</groupId>
<artifactId>richfaces-core-impl</artifactId>
</dependency>
...
<properties>
<org.richfaces.bom.version>4.1.0.Final</org.richfaces.bom.version>
</properties>
Any idea?
D3
Jboss 5.1 supports JSF 1.2 and not JSF 2.x. Rich Faces 4.x is built to work on JSF 2.x
You are using Jboss 5.1, but defining the dependencies as Rich Faces 4.x.
Since you are telling that you cannot switch to another Jboss version(I assume higher versions), you must think of coming down to RichFaces 3.x
I want to deploy a war in a JBoss 4.2 but I don't have control over its dir, so I can't replace the jsf-impl.jar and jsf-api.jar.
My question is: How to configure the war in order to depends on the jsf-impl.jar and jsf-api.jar exported in the war instead of this libraries from the server?
That depends on the server used. For JBoss 4.2 and newer, you can do that by adding the following context parameter to the webapp's web.xml.
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>