Skip to main content

EL3.0 problem with null string

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2003-06-10

web.xml set as below:


test page code as below:

        <h:inputText value="#{}" />
        <h:commandButton value="test" action="#{controller.test()}" />
        <h:outputText value="#{ == null}" />

test controller code as below:

public class Controller {
    private String name;
    public String getName() {
         return name;
    public void setName(String strName) { = strName;
    public String test() {
          return "";

when clear input text and click the test button,
on glassfish3.1.2, output true;
on glassfish4, output false;

Debug it, inputtext component's property as summitvale, localvalue, localvalueset all works well.
So, it's the EL 3.0 problem.

Change page code as:

<h:commandButton value="test" actionListener="#{controller.setName(null)}" action="#{controller.test}" />

When EL set name's value, it pass "" but not null.

Is it a problem with EL3.0 ?