Servlet to jsp communication best practice
问题 I'm learning how to write java servlets and jsp pages on google app engine. I'm attempting to use an MVC model but I'm not sure if I'm doing it right. Currently, I have a servlet that is called when a page is accessed. The servlet does all the processing and creates a HomePageViewModel object that is forwarded to the jsp like this: // Do processing here // ... HomePageViewModel viewModel = new HomePageViewModel(); req.setAttribute("viewModel", viewModel); //Servlet JSP communication