Can I include a static HTML file in a servlet response using the RequestDispatcher?
Created May 4, 2012
Nicola Ken Barozzi Yes. In the following code, pageName is a String containing the URL to include.
String encodedPageName = response.encodeUrl(pageName); this.getServletConfig().getServletContext().getRequestDispatcher(encodedPageName).include(request, response);