Page 1 of 1

EL in web.xml problem (Wildfly 14)

Posted: 27 Nov 2018, 17:29
by paulkeogh
The stanza in web.xml of;

Code: Select all

	<context-param>
		<param-name>primefaces.THEME</param-name>
		<param-value>babylon-#{guestPreferences.theme}</param-value>
	</context-param>
Does not work when I deploy to Wildfly 14 - the #{...} expression returns an empty string and the theme of course cannot be found.

The GuestPreference bean is definitely part of the deployed WAR and I have tried both the JSF (default) and CDI managed bean approach but neither works.

Is there something in Wildfly 14 that I explicitly need to enable to get this to work ?

Re: EL in web.xml problem (Wildfly 14)

Posted: 29 Nov 2018, 13:52
by mert.sincan
Interesting! Most of our users use Wildfly and an issue like this has not been reported by them. Could you please try sample project instead of .war?

Best Regards,

Re: EL in web.xml problem (Wildfly 14)

Posted: 03 Dec 2018, 13:14
by paulkeogh
I finally found the problem.

It is a complicated and random interaction of WAR and nested JAR project, Maven builds and JBoss Tools hot deploy - essentially the hot deployer is too hot and deploys the exploded WAR with missing classes - the simple but not obvious solution is to Refresh each JAR project in Maven before building the WAR.

The EL expansion in web.xml could of course not succeed if the GuestPreferences bean is not injected into the container in the first place.

Re: EL in web.xml problem (Wildfly 14)

Posted: 03 Dec 2018, 15:04
by mert.sincan
Thanks a lot for the update!

Best Regards,