At this time, I have a problem when I want known if the browser is
closed.
I have read somme e-Mail about this problem, and I am trying a
javascript solution.
I work under Window 95 ou NT, with Nestcape 4.6. I use servlet runner.
When the javascript function is trying to call my servlet:
1- it is good if the size of caches are not null (memory and disk
caches)
2- I have a problem if the size of the caches are null (memory and
disk caches)
In this case, my servlet doesn't receive one call, but many
calls, very quickly, and I don't receive a respond inside my browser.
I have the same problem if the javascript function is making a
redirection with a simple html file
Do you have an idea
Thanks in advance.
My html file
<HTML>
<HEAD>
<TITLE>SMD</TITLE>
<SCRIPT LANGUAGE="javascript">
function doQuit()
{
window.location.href="http://localhost:8080/servlet/Simple";
}
</SCRIPT>
</HEAD>
<FRAMESET COLS="120,*" BORDER="false" FRAMEBORDER="0" FRAMESPACING="0"
onUnload="doQuit()">
<FRAME SRC="frame/menu.html" MARGINWIDTH=0 MARGINHEIGHT=0 NORESIZE>
<FRAME SRC="frame/home.html" MARGINWIDTH=0 MARGINHEIGHT=0 NORESIZE
NAME="Home">
</FRAMESET>
</HTML>
My servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Simple extends HttpServlet
{
public void doGet (
HttpServletRequest request,
HttpServletResponse response
) throws ServletException, IOException
{
PrintWriter out;
String title = "Simple Servlet Output";
System.out.println("Calling servlet with Get method");
response.setContentType("text/html");
out = response.getWriter();
out.println("<HTML><HEAD><TITLE>");
out.println(title);
out.println("</TITLE></HEAD><BODY>");
out.println("<H1>" + title + "</H1>");
out.println("<P>This is output from SimpleServlet.");
out.println("</BODY></HTML>");
out.close();
}
}
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html