This is a small jsp page I am testing to understand the"isThreadSafe"
attribute. I observe two strange things with Tomcat 4.1.12:

1. The code generated when isThreadSafe is set to true or false is the
same. ( new code is generated with each change ). How can code generated
for these two cases be the same ?

2. On Netscape 7.0 ( mozilla ), if I open 2 windows side-by-side, and
make calls,  Netscape finishes the call of one window before starting
the call of another window. Looks like mozilla is checking to see if the
url's are the same and then waiting ??? IE makes simultaneous calls and
hence the print values differ.

Anybody else notice this. Can anybody give some pointers for question 1 ?

here is the jsp code:


<html><body>

<%@ page isThreadSafe="true" %>

<%! int j=0; %>


<%
   for(int i=0; i <= 10; i++ )
   {
       out.print("Value of j is " + j + "<br/>");
       j++;
       Thread.currentThread().sleep(3000);
   }
%>

</body></html>



Thanks

-- padhu

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com

Reply via email to