Use Jetty on WildFly 39.0.1

197 views
Skip to first unread message

Roger Lee

unread,
Mar 11, 2026, 7:12:24 AMMar 11
to WildFly
I have an issue the PrimeFaces Jakarta Java Faces components on Mojarra 4.0.13 & Undertow 2.3.23.Final. Specifically  "p:ajax" & "p:tabView".

The test & examples work fine on Jetty:

mvn clean package -Pnon-ee,mojarra-4.0

How easy is it to switch to Jetty & any guides? TIA 

James Perkins

unread,
Mar 12, 2026, 7:11:18 PMMar 12
to WildFly
You can't use Jetty and WildFly together. They are both Jakarta Servlet servers, but WIldFly is a full Jakarta EE server as well. WildFly uses Undertow for it's Jakarta Servlet implementation.

Are you seeing errors if you try to use WildFly?

Roger Lee

unread,
Mar 13, 2026, 5:31:25 AMMar 13
to WildFly
II've  been using WildFly from the JBoss days (3.x from 1999) & also JSF/Java Faces from RichFaces 3.1 & had to move PrimeFaces in 2012, started with 5.x. Currently using WildFly Distribution - 39.0.1, Mojarra 4.0.13, Undertow 2.3.23.Final & PrimeFaces (Jakarta) 15.0 13.

I've always had issues with 'p:tabView/p:view' since migrating from RichFaces. Now I have issues with 'p:ajax'.

No errors or exceptions, just won't select & display 'p:selectOneListbox/p:selectOneMenu' & want 'p:ajax'.to use event/listener to call my Controller

Just looking for some alternatives. TIA.

James Perkins

unread,
Mar 13, 2026, 6:39:34 PMMar 13
to WildFly
Ah, I see. This is definitely not my area of expertise so I'm not too sure what would cause that :) If you have some form a reproducer that can be shared, I'm happy to have a look though.

Jason Lee

unread,
Mar 23, 2026, 5:49:06 PMMar 23
to Roger Lee, WildFly
I just opened a PR to merge Mojarra 4.0.15 for WildFly 40, which includes this change that might help you: https://github.com/eclipse-ee4j/mojarra/commit/867a942e6aa5c22fef56134a9f011249f3e3a179

If you want to try it now and not wait for 40 you can replace

$WILDFLY_HOME/modules/system/layers/base/jakarta/faces/impl/main/jakarta.faces-4.0.13.jar


You can either overwrite the file (thus keeping the name) or, better, and this jar to that directory and change the version in modules/system/layers/base/jakarta/faces/impl/main/module.xml The latter makes reverting a bit easier.

Updating the module like that isn’t really a supported approach (as in, do this at your own risk), but users do that pretty frequently for small fixes like this one safely. 

If it works, it gets you a fix now and then you can update when WF 40 ships and that fits into your schedule, and, if it doesn’t, we know to keep looking for a fix. :)

Let me know how that goes.

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wildfly/60c01989-8231-4157-ac97-8693a919a7f2n%40googlegroups.com.

-- 
Jason Lee
Principal Software Engineer
IBM Java Middleware
Java Champion

Roger Lee

unread,
Mar 24, 2026, 6:25:58 AMMar 24
to WildFly
I upgraded from Mojarra 4.0.13 to 4.0.15.

INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 108) Initializing Mojarra 4.0.15 for context '/ViViFYd'

No issues, but 'p:ajax' doesn't execute my 'Controller'. Will continue looking. TIA.

Jose Socola

unread,
Mar 24, 2026, 9:22:19 AMMar 24
to Roger Lee, WildFly
Hi , 

We use PF15 and continue to move to wildfly39 with jakarta 4.1.4, what is the scope of u controller? 



Regards,
JS

Roger Lee

unread,
Mar 24, 2026, 11:49:38 AMMar 24
to WildFly
I've tried both using: p:ajax & f:ajax with: p:selectOneListbox

on my 'Controller':

public void handleCharactersChange(ActionEvent actionEvent) {

&

public void handleCharactersChange(Object object) {


Jose Socola

unread,
Mar 24, 2026, 1:11:31 PMMar 24
to Roger Lee, WildFly
Hi Roger, 

Do u have xhtml example how to call? With PF u need to use converter for dirty work, check this example maybe can help u

public void handleCharactersChange(AjaxBehaviorEvent event){}

package org.primefaces.diamond.view;


import java.io.Serializable;

import java.util.ArrayList;

import java.util.List;


import jakarta.annotation.PostConstruct;

import jakarta.faces.component.UIComponent;

import jakarta.faces.context.FacesContext;

import jakarta.faces.convert.Converter;

import jakarta.faces.event.AjaxBehaviorEvent;

import jakarta.faces.view.ViewScoped;

import jakarta.inject.Named;


@Named

@ViewScoped

public class CostVarianceView implements Serializable {


// Getter y Setter para el objeto seleccionado

private GasStationTO selectedGasStationTO = new GasStationTO();

private List<GasStationTO> listGasStation; // La lista que inventamos

@PostConstruct

public void init() {

// Inventamos los datos (Simulación de base de datos)

listGasStation = new ArrayList<>();

listGasStation.add(new GasStationTO(1L, "Estación Central - Repsol"));

listGasStation.add(new GasStationTO(2L, "Grifo Norte - Primax"));

listGasStation.add(new GasStationTO(3L, "E.S. El Puerto - Petroperú"));

listGasStation.add(new GasStationTO(4L, "Gasolinera San Isidro - Shell"));

}

public GasStationTO getSelectedGasStationTO()

{

return selectedGasStationTO;

}


public void setSelectedGasStationTO(GasStationTO selectedGasStationTO)

{

this.selectedGasStationTO = selectedGasStationTO;

}


// Este es el método que llama el p:ajax

public void handleCharactersChange(AjaxBehaviorEvent event)

{

System.out.println("Hello!");

if (selectedGasStationTO != null) {

System.out.println("Lógica ejecutada para: " + selectedGasStationTO.getName());


}

}

private Converter<GasStationTO> gasStationConverter = new Converter<>() {

@Override

public GasStationTO getAsObject(FacesContext context, UIComponent component, String value) {

if (value == null || value.isEmpty()) return null;

return listGasStation.stream()

.filter(g -> String.valueOf(g.getId()).equals(value))

.findFirst()

.orElse(null);

}


@Override

public String getAsString(FacesContext context, UIComponent component, GasStationTO value) {

if (value == null || value.getId() == null) return "";

return String.valueOf(value.getId());

}

};

public Converter<GasStationTO> getSelectedGasStationSupport() {

return gasStationConverter;

}

public List<GasStationTO> getListGasStation()

{

return listGasStation;

}

public void setListGasStation(List<GasStationTO> listGasStation)

{

this.listGasStation = listGasStation;

}

public Converter<GasStationTO> getGasStationConverter()

{

return gasStationConverter;

}

public void setGasStationConverter(Converter<GasStationTO> gasStationConverter)

{

this.gasStationConverter = gasStationConverter;

}

}


<ui:composition xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="jakarta.faces.html"

xmlns:f="jakarta.faces.core"

xmlns:ui="jakarta.faces.facelets"

xmlns:p="primefaces"

xmlns:pb="http://xmlns.jcp.org/jsf/composite/primeblocks"

template="/WEB-INF/template.xhtml">


<ui:define name="title">Demo</ui:define>


<ui:define name="content">

<h:form id="viewCostVariance">

<p:growl id="messages" showDetail="true" />


<p:tabView id="tabViewMain">

<p:tab title="Estaciones">

<h:panelGrid columns="2" cellpadding="7">

<p:outputLabel for="listGasStationSelected" value="Seleccione Estación:" />


<p:selectOneListbox id="listGasStationSelected"

value="#{costVarianceView.selectedGasStationTO}"

var="g"

converter="#{costVarianceView.selectedGasStationSupport}"

filter="true"

filterMatchMode="contains">

<f:selectItems value="#{costVarianceView.listGasStation}"

var="item"

itemLabel="#{item.name}"

itemValue="#{item}" />


<!-- USAR EL LISTENER CORRECTO SIN ACTIONEVENT -->

<p:ajax listener="#{costVarianceView.handleCharactersChange}"

process="@this"

update="panelGridGasStationFuel" />


<p:column>

<h:outputText value="#{g.name}" />

</p:column>

</p:selectOneListbox>

</h:panelGrid>


<!-- Panel que se actualiza al cambiar la selección -->

<h:panelGroup id="panelGridGasStationFuel">

<p:fieldset legend="Detalle de Combustible" rendered="#{not empty costVarianceView.selectedGasStationTO}">

<h:outputText value="Estación seleccionada: #{costVarianceView.selectedGasStationTO.name}" />

<!-- Más campos aquí -->

</p:fieldset>

</h:panelGroup>


</p:tab>

</p:tabView>

</h:form>

</ui:define>


</ui:composition>



package org.primefaces.diamond.view;

import java.io.Serializable;

import java.util.Objects;

public class GasStationTO implements Serializable

{

private static final long serialVersionUID = 1L;

private Long id;

private String name;

public GasStationTO()

{

}

public GasStationTO(Long id, String name)

{

this.id = id;

this.name = name;

}

public Long getId()

{

return id;

}

public void setId(Long id)

{

this.id = id;

}

public String getName()

{

return name;

}

public void setName(String name)

{

this.name = name;

}

@Override

public boolean equals(Object o)

{

if (this == o)

return true;

if (o == null || getClass() != o.getClass())

return false;

GasStationTO that = (GasStationTO) o;

return Objects.equals(id, that.id); // Compara por el ID único

}

@Override

public int hashCode()

{

return Objects.hash(id);

}

@Override

public String toString()

{

return name; // Útil para depuración

}

}


Regards,
JS

Message has been deleted

Jose Socola

unread,
Mar 24, 2026, 6:01:04 PMMar 24
to Roger Lee, WildFly
Hi,

I think u can use omnifaces.SelectItemsConverter, or create a converter., to be clear this is not a problem from wildfly 39 or other version.


Regards,
JS


El martes, 24 de marzo de 2026, Roger Lee <roge...@notify.co.uk> escribió:
@Jose. After upgrading to 'Mojarra 4.0.15' it has show an Error. Looking at your example it highlighted my error is probably with the/no 'converters'. 

public Converter<GasStationTO> getSelectedGasStationSupport() {

I thought that I could use the OmniFaces 'ListConverter' as:

<p:selectOneListbox
id="archersCharacters"
converter="omnifaces.ListConverter"
value="#{daily.theArchersCharactersString}">

However when I 'click' on my 'selectOneListbox':

<p:ajax
    listener="#{theArchersDailyRSSController.handleCharactersChange}"
    process="@this"
    update="panelCharacterSelect"/>

I get:

An Error Occurred:
Cannot invoke "java.util.List.iterator()" because "this.list" is null

Looks like I need to create my own 'Converter'. 

Thanks. 
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wildfly/ccb77d43-9b47-4c95-a3d0-b201f67a4f41n%40googlegroups.com.

Jason Lee

unread,
Mar 24, 2026, 6:04:47 PMMar 24
to Jose Socola, Roger Lee, WildFly
I like to hear that! :P I am, though, watching and waiting to see if there’s anything we need to do in WF or Mojarra. :)

Roger Lee

unread,
Mar 25, 2026, 5:50:48 AMMar 25
to WildFly
Using OmniFace - converter="omnifaces.SelectItemsConverter". Which I used elsewhere successfully.

XHTML:

<p:column width="10%" headerText="selectOneListbox - Select Characters">
    <p:panelGrid id="charactersListPanel" style="height:100%">
        <p:selectOneListbox
            id="archersCharacters"
            converter="omnifaces.SelectItemsConverter"
            value="#{daily.theArchersCharactersString}">

            <f:selectItems
                value="#{daily.theArchersCharactersString}"
                var="characterItem"
                itemLabel="#{characterItem}"
                itemValue="#{characterItem}"/>

            <p:ajax
               listener="#{theArchersDailyRSSController.handleCharactersChange}"
               process="@this"
               update="panelCharacterSelect"/>
        </p:selectOneListbox>
    </p:panelGrid>
</p:column>

Controller:

public void handleCharactersChange(AjaxBehaviorEvent ajaxBehaviorEvent) {
    LOGGER.info(">>>>> 3.1 TheArchersDailyRSSController onCharactersChange ajaxBehaviorEvent {}", ajaxBehaviorEvent);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    LOGGER.info(">>>>> 3.2 TheArchersDailyRSSController onCharactersChange facesContext {}", facesContext);
}

Click 'selectOneListbox' Google Console:

core.js.xhtml?ln=primefaces&v=15.0.13:24 Initiating ajax request.
09:37:53.424 core.js.xhtml?ln=primefaces&v=15.0.13:24 Form to post undefined.
09:37:53.424 core.js.xhtml?ln=primefaces&v=15.0.13:24 URL to post undefined.
09:37:53.424 core.js.xhtml?ln=primefaces&v=15.0.13:24 Post Data:jakarta.faces.partial.ajax=true&jakarta.faces.source=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3AarchersCharacters&jakarta.faces.partial.execute=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3AarchersCharacters&jakarta.faces.partial.render=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3ApanelCharacterSelect&jakarta.faces.behavior.event=valueChange&jakarta.faces.partial.event=change
09:37:53.609 core.js.xhtml?ln=primefaces&v=15.0.13:24 Response received successfully.
09:37:53.612 core.js.xhtml?ln=primefaces&v=15.0.13:24 DOM is updated.
09:37:53.612 core.js.xhtml?ln=primefaces&v=15.0.13:24 Response completed.

Nothing displayed on my Terminal. 

Using:
  • WildFly Distribution - 39.0.1
  • Mojarra 4.0.13
  • Undertow 2.3.23.Final (2026.02.06)
  • jakarta.faces-4.0.15.jar

TIA

On Tuesday, 24 March 2026 at 22:04:47 UTC Jason Lee wrote:
I like to hear that! :P I am, though, watching and waiting to see if there’s anything we need to do in WF or Mojarra. :)

On Mar 24, 2026, at 5:00 PM, Jose Socola <jso...@gmail.com> wrote:

Hi,

I think u can use omnifaces.SelectItemsConverter, or create a converter., to be clear this is not a problem from wildfly 39 or other version.


Regards,
JS

Roger Lee

unread,
Mar 25, 2026, 6:07:51 AMMar 25
to WildFly
BTW - I've used other Omnifaces converters  before . NOT "omnifaces.SelectItemsConverter".

Jose Socola

unread,
Mar 25, 2026, 12:33:41 PMMar 25
to Roger Lee, WildFly
Here is the main problem, u can't use the same variable for both 
    value="#{daily.theArchersCharactersString}"> change to String or Object
            <f:selectItems
                value="#{daily.theArchersCharactersString}"
--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.

Roger Lee

unread,
Mar 26, 2026, 7:03:30 AMMar 26
to WildFly
Hello Jose,

Can you explain with "u can't use the same variable for both ". If I don't use 'theArchersCharactersString' on both 'values' one is not displayed.

TIA. 

Roger Lee

unread,
Mar 27, 2026, 6:45:52 AMMar 27
to WildFly
Cannot get Ajax to call my 'Controller' from 'p:selectOneListbox':

<p:column width="10%" headerText="selectOneListbox - Select Characters">
    <p:panelGrid id="charactersListPanel" style="height:100%">
        <p:selectOneListbox
            id="archersCharacters"
            converter="omnifaces.SelectItemsConverter"
            value="#{daily.theArchersCharacters}">

            <f:selectItems
                value="#{daily.theArchersCharacters}"
                var="characterItem"
                itemLabel="#{characterItem.character}"
                itemValue="#{characterItem.character}"/>


            <p:ajax
                listener="#{theArchersDailyRSSController.handleCharactersChange}"
                process="@this"
                update="panelCharacterSelect"/>

         </p:selectOneListbox>    
    </p:panelGrid>
</p:column>

My Controller:

@Named("theArchersDailyRSSController")
@ViewScoped
public class TheArchersDailyRSSController implements Serializable {
    ...

    public void handleCharactersChange(AjaxBehaviorEvent ajaxBehaviorEvent) {
        LOGGER.info(">>>>> 3.1 TheArchersDailyRSSController onCharactersChange ajaxBehaviorEvent {}", ajaxBehaviorEvent);

        FacesContext facesContext = FacesContext.getCurrentInstance();
        LOGGER.info(">>>>> 3.2 TheArchersDailyRSSController onCharactersChange facesContext {}", facesContext);
    }
    ...
}

Displays on Google Console:

Initiating core.js.xhtml?ln=primefaces&v=15.0.13:24 Initiating ajax request.
10:39:35.822 core.js.xhtml?ln=primefaces&v=15.0.13:24 Form to post undefined.
10:39:35.822 core.js.xhtml?ln=primefaces&v=15.0.13:24 URL to post undefined.
10:39:35.822 core.js.xhtml?ln=primefaces&v=15.0.13:24 Post Data:jakarta.faces.partial.ajax=true&jakarta.faces.source=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3AarchersCharacters&jakarta.faces.partial.execute=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3AarchersCharacters&jakarta.faces.partial.render=formViViFYd%3AtabViewHome%3AtabViewTheArchers%3AformTheArchersDaily%3AdataTableTheArchersDaily%3A1%3ApanelCharacterSelect&jakarta.faces.behavior.event=valueChange&jakarta.faces.partial.event=change
10:39:36.041 core.js.xhtml?ln=primefaces&v=15.0.13:24 Response received successfully.
10:39:36.045 core.js.xhtml?ln=primefaces&v=15.0.13:24 DOM is updated.
10:39:36.045 core.js.xhtml?ln=primefaces&v=15.0.13:24 Response completed.

No errors on WildFly console. Won't display 'ajaxBehaviorEvent'. The PF example won't run with my Configuration.


I'm totally stuck!  

Jose Socola

unread,
Mar 27, 2026, 11:02:01 AMMar 27
to Roger Lee, WildFly
Hi Roger,

country is a String and countries is a List<String> on showcase

@Named @RequestScoped public class SelectOneView { private String option; private Country country; private List<Country> countries;
...

<h5>Advanced</h5> <div class="col-12 md:col-6 lg:col-4 xl:col-3"> <p:selectOneListbox id="advanced" value="#{selectOneView.country}" converter="#{countryConverter}" var="c" filter="true" filterMatchMode="contains" filterNormalize="true"> <f:selectItems value="#{selectOneView.countries}" var="country" itemLabel="#{country.name}" itemValue="#{country}"/> <p:column> <span class="flag flag-#{c.code}" style="width: 30px; height: 20px"/> </p:column> <p:column> <h:outputText value="#{c.name}"/> </p:column> </p:selectOneListbox> </div>

In your code u use the same variable for both, 

<p:column width="10%" headerText="selectOneListbox - Select Characters">
    <p:panelGrid id="charactersListPanel" style="height:100%">
        <p:selectOneListbox
            id="archersCharacters"
            converter="omnifaces.SelectItemsConverter"
            value="#{daily.theArchersCharacters}"> --> change to String or Object

            <f:selectItems
                value="#{daily.theArchersCharacters}" -->is a List
                var="characterItem"
                itemLabel="#{characterItem.character}"
                itemValue="#{characterItem.character}"/>

            <p:ajax
                listener="#{theArchersDailyRSSController.handleCharactersChange}"
                process="@this"
                update="panelCharacterSelect"/>

         </p:selectOneListbox>    
    </p:panelGrid>
</p:column>


Regards
JS


Roger Lee

unread,
Apr 1, 2026, 6:10:25 PM (10 days ago) Apr 1
to WildFly
Hello Jose.

Thanks for all of you help. I updated my PF XHTML, Controller. Unfortunately I can't get the 'Ajax' call in the web and nothing is displayed on my Java Controller:

<p:column width="10%" headerText="selectOneListbox - Select Characters">
    <p:panelGrid id="charactersListPanel" style="height:100%">
        <p:selectOneListbox
            id="archersCharacter"
            converter="omnifaces.SelectItemsConverter"
            value="#{daily.theArchersCharacter}">
        
            <f:selectItems
                value="#{daily.theArchersCharacter}"
                var="theArchersCharacter"
                itemLabel="#{theArchersCharacter.character}"
                itemValue="#{theArchersCharacter}"/>

            <p:ajax
                event="change"
                listener="
                {theArchersDailyRSSController.handleCharactersChange}"
                process="@this"
                update=""/>

        </p:selectOneListbox>
    </p:panelGrid>
</p:column>

Controller:

public void handleCharactersChange(AjaxBehaviorEvent ajaxBehaviorEvent) {
    LOGGER.info(">>>>> 3.1 TheArchersDailyRSSController onCharactersChange ajaxBehaviorEvent {}", ajaxBehaviorEvent);

    FacesContext facesContext = FacesContext.getCurrentInstance();
    LOGGER.info(">>>>> 3.2 TheArchersDailyRSSController onCharactersChange facesContext {}", facesContext);
}

The 'p:selectOneListbox' displayed as data:

itemLabel="#{theArchersCharacter.character}"
itemValue="#{theArchersCharacter}"

Screenshot 2026-04-01 at 23.03.13.png
Google Tools Console:

Screenshot 2026-04-01 at 23.07.29.png
Reply all
Reply to author
Forward
0 new messages