Exclude (delete) this statement from the doGet servlet because you are importing the response into the JSP.
request.getRequestDispatcher("/PunchOutCanonicalError.jsp") .forward(request,response);
doGet should be:
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException{ String template="test"; abcViewBean punchOutCan = new abcViewBean(); punchOutCan.setPunchOutCanonicalRes(template);
And the JSP code,
<jsp:include page="/PunchOutCanonicalServlet" flush="true"/> <c:out value="${punchOutCan.punchOutCanonicalRes}" />
source share