You can also use your JSF component's attribute 'requiredMessage'.
I was still wondering if there is a way to show the custom
requiredmessage directly from the @NotNull property...
AFAIK, entity level restrictions only apply when the entity is being persisted/updated.
Are you sure about that?
When I use @Length validation or @Email validation I get the error messages on the UI before persisting the object.
Your observation is correct. I think I made a misasumption based on what I thought @NotNull did. Anyways, thanks for pointing this out.
Regarding your first question, @Length may be more suitable to your needs in this case, due to the fact that JSF is passing a zero lenght string instead of a null.