In HFSJ book -> Scriptless JSPs chapter -> Mock Exam Chapter 8 -> pg. 417 -> question 2.
Given that a web application stores the webmaster email address in the servlet context initialization parameter called master-email. Which retrieves that value? why is the A. wrong? Can anyone explain?
A. <a href='mailto:${initParam.master-email}'>email me</a>
Yes, Its wrong because '-' considered as an Arithmetic Operator. Here, it will be searching for an init param under "master" and then it will subtract it with "email" attribute if it exists.
So, attribute name should follow java naming rules. In java also we cannot have '-' in a variable name.