hi
i am using an html to accept some data, then a jsp which puts that data in the session and calls a servlet which displays that data. now unless u clear the "offline contents" from IE, the servlet will not run, and it will show the page from the browser history the code which i have used is as follows.
tmp1.html----------------------
<html>
<body>
<form action="http://localhost:7001/Cyberdrawer/jsp/tmp2.jsp" method="post">
<input type="text" name="data" size="15">
<br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
tmp2.jsp-----------------------
<%@ page language="java"%>
<html>
<body>
<%
String d = request.getParameter("data");
session.putValue("data",d);
%>
<A HREF="#" onClick="window.open('http://localhost:7001/tmp3');" >click here</A>
</body>
</html>
tmp3.java (servlet)----------------------
public class tmp3 extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException
{
System.out.println("tmp3 started");
PrintWriter out = response.getWriter();
HttpSession session = request.getSession(false);
String d = (String) session.getValue("data");
out.println("The value received is : " + d);
System.out.println("tmp3 over");
}
}
i have to use window.open in tmp2.jsp as i want the servlet to start in a new window and i dont want to use set Headers like cache-control etc. in the servlet.
is there any other solution?
Thanx,
Padmanabh