Is there a more efficient way of loading views within my java app? I'm building a web application in Java.  I'm new to Java, so before I get too far into this... I'm hoping to take advantage of all the experience here and learn the problems with this setup.

My Servlet

package cms.content;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Ben
 */
@WebServlet(name = "EditServlet", urlPatterns = {"/content/edit"})
public class EditServlet extends library.Controller {
    @Override
    public void doGet (HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        this.loadView(request, response, "/content/edit");

        response.getWriter().write("Hi");
        System.out.println("EditServlet loaded");
    }
}


My Controller

package library;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Ben
 */
public class Controller extends HttpServlet {
    public final library.MySQL db;

    public Controller() {
        this.db = new MySQL();
    }

    public void loadView (HttpServletRequest request, HttpServletResponse response, String view)
            throws ServletException, IOException {
        RequestDispatcher dispatcher = request.getRequestDispatcher(view+".jsp");

        response.setContentType("text/html;charset=UTF-8");

        System.out.println("MyServlet::LoadView() success");

        dispatcher.forward(request, response);
    }
}


My View

&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
        &lt;title&gt;JSP Page&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;h1&gt;This is edit.jsp&lt;/h1&gt;
    &lt;/body&gt;
&lt;/html&gt;


I haven't tried to pass any parameters to this view or anything like that.  But are there any obvious problems or improvements that need to be made?
First off, its not clear what you're trying to achieve, so its hard to evaluate. 

But, looking a the code there comes after you forward to the view, that could be confusing, because it will still execute. 

At a higher level, I also don't really see the need for this complicated of a setup to get to your edit page when you can just link straight to the edit jsp all nice an RESTful like.  If you're just experimenting and trying to learn that's cool, but if you're really trying to get something done then you should look at just using an existing framework.