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 and the hobby value is null
The code is -
In the Sevlet class -
request.setAttribute("hobby", null); request.getRequestDispatcher("display.jsp").forward(request, response);
In display.jsp -
<c:when test='${hobby.equals("hobby1")}'>
user4768611
source share