when i logins into my profile.i enters into 1st page there is one logout button. when i clicks on that i comes out from out my acc. But there is one link in 1st page when i clicks on that link i moves to 2nd page when i comes to 1st page by using browser back button and i click on to log out button of 1st page . i comes out from my acc. but when i clicks on browsers forword button i again comes into 2nd page. what is the problem.
empoperation.jsp--(1st page)
<script>
function go() {
window.location.replace("elogout.jsp",'window','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
self.close()
}
</script>
<%
String s1=request.getParameter("val1");
String s2=request.getParameter("val2");
session.setAttribute("user",s1);
session.setAttribute("id",s2);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registarion</title>
<link rel="stylesheet" href="MyNewCss2.css">
</head>
<body>
<div ><font style="color:green ;float:left;font-size:20px;margin-left:20px;face:"Courier New", Courier, monospace;"><b>Welcome</font> <span style="color:orange;font-size:20px;font-style:oblique;"><%=s1%>(<%=s2%>)</b></span>
<a href="javascript:go()" title="Log out" style="float:right;text-decoration:none;font-size: 20px;margin-left:20px; color: black;">Log Out    </a></div>
<center>
<div class="menu2"><br><br><br><br>
<a href="test.jsp" title="My Details" style="font-size: 40px;color:green;text-decoration:none;font-style:"Courier New", Courier, monospace;">My Profile</a><br><br><br>
<a href="empupdateform.jsp?msg1=<%=s1%>" title="Update employee" style=" font-size: 40px;color:orange;text-decoration:none;">Update My Profile</a><br><br><br>
</div>
</center>
</body>
</html>
============================================
test.jsp--(2nd page)
<script>
function go() {
window.location.replace("elogout.jsp",'window','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
self.close();
}
</script>
<%
String a=(String)session.getAttribute("id");
String s="";
String str="";
String str1="";
Connection con=null;
Statement smt=null;
PreparedStatement pst=null;
ResultSet rs=null;
ResultSet rs1=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:MyNewProjectDsn");
str="select * from compadd where Reg_id='"+a+"'";
pst=con.prepareStatement(str);
rs=pst.executeQuery();
if(rs.next())
{%>
<div><a href="javascript:go()" title="Log out" style="float:right;text-decoration:none;font-size: 20px;margin-left:20px; color: black;">Log Out    </a></div>
--my code html--
<% }
else
{
str1="select * from empregtbl where Reg_id='"+a+"'";
pst=con.prepareStatement(str1);
rs=pst.executeQuery();
while(rs.next())
{%><br><br>
<div><a href="empoperation.jsp" title="go back" style="float:left;text-decoration:none;font-size: 20px;margin-left:20px; color: black;">back    </a> <a href="javascript:go()" title="Log out" style="float:right;text-decoration:none;font-size: 20px;margin-left:20px; color: black;">Log Out    </a></div>
<br>
--my code--
}
}
}