posted 7 years ago
Since you are doing a forward using RequestDispatcher, the JSP which does the forward cannot write any content of its own. Either move this forward as the first line of the JSP page or use an include. Also the logic that you are using in the JSP should not be in a JSP, its not a good design. You can pass your request through either a servlet or a filter which will do this processing...