LayoutView/src/io/github/svanderburg/layout/view/IndexServlet.java
protected static void dispatchLayoutView(Application application, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
	{
		Route route = determineRoute(application, req, resp);
		Page currentPage = route.determineCurrentPage();
		
		// Include controller page if one is defined
		if(currentPage instanceof ContentPage)
		{
			ContentPage contentPage = (ContentPage)currentPage;
			String controller = contentPage.getContents().getController();
			
			if(controller != null)
				req.getRequestDispatcher(controller).include(req, resp);
		}
		
		// Include the view page
		req.setAttribute("app", application);
		req.setAttribute("route", route);
		req.setAttribute("currentPage", currentPage);
		req.getRequestDispatcher("/WEB-INF/index.jsp").include(req, resp);
	}
/**
	 * Looks up the requested page and dispatches the request to the page that displays its sections
	 * and contents. 
	 * 
	 * @param application Encoding of the web application layout and pages
	 * @param req HTTP request object that contains request parameters
	 * @param resp HTTP response object to which the output is sent
	 * @throws ServletException
	 * @throws IOException
	 */
Looks up the requested page and dispatches the request to the page that displays its sections
and contents.


Looks up the requested page and dispatches the request to the page that displays its sections and contents .
protected static void dispatchLayoutView(Application application, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
	{
		Route route = determineRoute(application, req, resp);
		Page currentPage = route.determineCurrentPage();
		if(currentPage instanceof ContentPage)
		{
			ContentPage contentPage = (ContentPage)currentPage;
			String controller = contentPage.getContents().getController();
			if(controller != null)
				req.getRequestDispatcher(controller).include(req, resp);
		}
		req.setAttribute("app", application);
		req.setAttribute("route", route);
		req.setAttribute("currentPage", currentPage);
		req.getRequestDispatcher("/WEB-INF/index.jsp").include(req, resp);
	}
protected static void dispatchLayoutView ( Application application , HttpServletRequest req , HttpServletResponse resp ) throws ServletException , IOException { Route route = determineRoute ( application , req , resp ) ; Page currentPage = route . determineCurrentPage ( ) ; if ( currentPage instanceof ContentPage ) { ContentPage contentPage = ( ContentPage ) currentPage ; String controller = contentPage . getContents ( ) . getController ( ) ; if ( controller != null ) req . getRequestDispatcher ( controller ) . include ( req , resp ) ; } req . setAttribute ( "app" , application ) ; req . setAttribute ( "route" , route ) ; req . setAttribute ( "currentPage" , currentPage ) ; req . getRequestDispatcher ( "/WEB-INF/index.jsp" ) . include ( req , resp ) ; }
Looks up the requested page and dispatches the request to the page that displays its sections
 and contents.
Looks up the requested page and dispatches the request to the page that displays its sections and contents .
// Include controller page if one is defined // Include the view page