<table border="1" style="width:300px">
     <tr><c:out value = "Ques. 1 ${question.question}"/></tr>
     <%
       @SuppressWarnings("unchecked")
       List<answers> ans = (List<answers>)request.getAttribute("question.answer");
       for(int i=0; i<ans.size();i++){  // LINE 14
       out.println(ans.get(i));
       }
     %>
This is jsp code!! I am new to JSP's. "question" is an attribute which i passed in jsp from my controller. Also , "answer" is variable defined in my question class.
This is throwing a null point exception on for-loop at line 14 . Although my answer variable which is of (List answer) type has values
Thanks for help
 
     
     
    