In the below code snippet, the intention is to take value for name from a variable, however no value gets output when it is tried with EL, while direct assignment works fine.
<%! String sName; %>
<% sName="ABC"; %>
<H3> Hello <c:out value="${sName}"/> </H3>
<H3> Hello <c:out value="ABC"/> </H3>
What is missing or has gone wrong here?
Thanks in advance.