My question is straightforward as you can see.
What is the difference between #{...} and ${...} in EL Syntax?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply put, the
${}can do only aget, while the#{}can do agetand asetof the value.In JSF on legacy JSP, the
#{}syntax is mandatory to trigger auto-creation of managed beans and to set request parameters as model values. If you used${bean.value}in a JSF page, then the managed bean with namebeanwon’t be auto-created if it isn’t already in the scope. Also, the managed bean propertyvaluewon’t be set if the form was submitted with that value in an input component.In JSF on Facelets, the
${}is reinterpreted as#{}and thus they will behave exactly the same.See also: