I am having problem with redirect in jsp , the page just remains and doesn't throw any error.
I am able to do redirect when I direct write the script in my login.jsp like
<%
String redirectURL = "/client/index.jsp";
response.sendRedirect(redirectURL);
%>
<t:login title="Client Login">
..........
</t:login>
But I am unable to do redirect when I split the file into three and include it. below is my implementation.
login.jsp
<%@include file="/include/checkhandler.jsp"%>
checkhandler.jsp - this is a script that will check for file in handler folder and include it when it is exist.
......
request.getRequestDispatcher(handler).include(request, response);
......
login_handler.jsp this is the file the dispatcher will include
String redirectURL = "/client/index.jsp";
response.sendRedirect(redirectURL);
out.println("hello world");
After I execute this script , the hello world displayed but it is still stay at the same page without any error.