The following code is not working properly. for every odd click on the link it is working. On the even click on the link is not working. Please help give me the solution. I am pasting the 3 files code here. one.jsp ======= <%@ page language="java" import="java.io.*,java.sql.*,java.text.*" %> <% if (request.getParameter("currfile")!=null) if (request.getParameter("currfile").equals("one.jsp")) if (request.getParameter("filename")!=null) { String str=request.getParameter("filename"); %> <jsp:forward page="<%=str%>"> </jsp:forward> <% } PrintWriter pw=response.getWriter(); pw.println("<script language=\"javascript\">"); pw.println("function sub1(abc)"); pw.println("{"); pw.println("document.frm1.filename.value=abc;"); pw.println("document.frm1.submit();"); pw.println("}"); pw.println("</script& gt;"); pw.println("<html>"); pw.println("<form name=frm1 method=\"post\">"); pw.println("<input type=hidden name=filename>"); pw.println("<input type=hidden name=currfile value=one.jsp>"); pw.println("one<br>"); pw.println("<a href=\"javascript:sub1(\'two.jsp\');\">two</a><br>"); pw.println ("<a href=\"javascript:sub1(\'three.jsp\');\">three</a><br>"); pw.pri ntln("</form>"); pw.println("</html>"); %>