Yesterday I appeared in an interview. The interviewer shows me this code and asked-
<c:when test='${hobby.equals("hobby1")}'>
Why there is no null pointer, while the value of hobby
is null
Code is as-
In
Sevlet class
-
request.setAttribute("hobby", null);
request.getRequestDispatcher("display.jsp").forward(request, response);
In
display.jsp
-
<c:when test='${hobby.equals("hobby1")}'>