I'm a beginner on JSP, I'm trying to develop a small MVC project, and for login page, it's kind of easy to use MVC, like, login.jsp-->LoginServlet.java--->UserBean.java.
But, after signing in, I have a Main.jsp page with several html elements on it, one of these elements is a dropdown list, and the items are from database, I've seen that people doing this with below code inside the jsp, but this is not so "MVC", right? there's no "C", so, I'm curious to know what it the best practice for this scenario? Thanks!
<%
database stuff...
while(resultset.next()){
%>
<option value="<%=rs.getString("DEPT_NO")%>"><%=rs.getString("DEPT_NAME")%></option>
<% }