how to fix Cannot call sendRedirect() after the response has been committed?

you have already forwarded the response in catch block: RequestDispatcher dd = request.getRequestDispatcher(“error.jsp”); dd.forward(request, response); so, you can not again call the : response.sendRedirect(“usertaskpage.jsp”); because it is already forwarded (committed). So what you can do is: keep a string to assign where you need to forward the response. String page = “”; try { } … Read more

What is the difference between JSF, Servlet and JSP?

JSP (JavaServer Pages) JSP is a Java view technology running on the server machine which allows you to write template text in client side languages (like HTML, CSS, JavaScript, ect.). JSP supports taglibs, which are backed by pieces of Java code that let you control the page flow or output dynamically. A well-known taglib is JSTL. JSP also supports Expression … Read more