How to Control requestDispatcher in JSP
Iam getting some values from a servlet through getAttribute in a jsp. In Jsp iam setting again some values into another JSP . Iam using requestDispatcher to pass these values in JSP and Servlet.In the second JSP the requestDispatcher should only work when I press the BACK Button, How to acheive this as presently its not showing the back button in JSP itself and directly its executing the requestdispatcher .Iam using JavaScript for BACK Button Functions and have put requestDispatcher statement in that function.
if (chr_xx_Action =="Back")
{
{
<%
String a=(String)request.getAttribute("v_share");
String b=(String)request.getAttribute("v_lot");
System.out.println("JSp a="+a);
System.out.println("JSp b="+b);
request.setAttribute("share",a);
request.setAttribute("lot",b);
RequestDispatcher dispatcher=request.getRequestDispatcher("/checking.jsp");
dispatcher.forward(request,response);
%>
returntrue;
}

