I was wondering about the net to use MVC in my JSP project and found a great discussion here, now I have following:
public class Subject {
private String subjectId = null;
private String subjectName = null;
public String getSubjectId() {
    return subjectId;
}
public void setSubjectId(String subjectId) {
    this.subjectId = subjectId;
}
public String getSubjectName() {
    return subjectName;
}
public void setSubjectName(String subjectName) {
    this.subjectName = subjectName;
}
}
and my SubjectDAO class is :
public class SubjectDAO {
public List<Subject> subjectList() throws SQLException{
    Connection connection = null;
    PreparedStatement statement = null;
    ResultSet resultSet = null;
    List<Subject> subjects = new ArrayList<>();
    try {
        connection = DatabaseManager.initConnection();
        statement = connection.prepareStatement(Constant.SUBJECT_QUERY);
        resultSet = statement.executeQuery();
        while (resultSet.next()) {
            Subject subject = new Subject();
            subject.setSubjectId(resultSet.getString("_id"));
            subject.setSubjectName(resultSet.getString("subj_name"));               
            subjects.add(subject);
        }
    } finally {
        if (resultSet != null) try { resultSet.close(); } catch (SQLException ignore) {}
        if (statement != null) try { statement.close(); } catch (SQLException ignore) {}
        if (connection != null) try { connection.close(); } catch (SQLException ignore) {}
    }
    return subjects;
}
}
and in my ControllerServlet I have :
protected void doGet(HttpServletRequest request,
        HttpServletResponse response) throws ServletException, IOException {
try {
        List<Subject> subjects = subjectDAO.subjectList();          
        request.setAttribute("subjects", subjects);
        getServletContext().getRequestDispatcher("/content.jsp").forward(
                request, response);
    } catch (Exception e) {
        throw new ServletException("Cannot obtain subjects from DB", e.getCause());
    }
}
my JSP as View is :
    <c:forEach items="${subjects}" var="subject">                       
    <li
        <c:catch>
            <c:choose>
                <c:when test="${subject.subjectId == param.subj_id}">
                <c:out value="class=\"selected\""/>
                </c:when>
            </c:choose> 
        </c:catch>                      
    ><a href='/programming-iqs/admin-controller?action=manage-content&subj_id=
    <c:out value="${subject.subjectId}"/>'>
    <c:out value="${subject.subjectId}"/>
    </a> 
        </li>
   </c:forEach>
using the code above I'm getting :
javax.servlet.ServletException: Cannot obtain subjects from DB
I'm unable to resolve this issue, any help is greatly appreciated.
NOTE
Before using/implementing MVC my code for JSP was :
<%
ResultSet sujectResult = DatabaseManager.getSubjects();
    while (sujectResult.next()) { %>
        <li <%
            String selectedSubject = request.getParameter("subj_id");
            try {
                if (selectedSubject.equals(sujectResult.getString("_id"))) {%>
                                class="selected" <%}%>><a
                        href='/programming-iqs/admin-controller?action=manage-content&subj_id=
<%= sujectResult.getString("_id")%>'>
<%= sujectResult.getString("subj_name")%>
</a> <%
} catch (NullPointerException e) {
} 
} %></li>
and off-course that code was working very well, now please help me in implementing MVC. Thanks