tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Reutter <tom...@meinsenf.at>
Subject Re: "processing page"
Date Thu, 18 Apr 2002 11:12:15 GMT
> The server push example is very cool, but it only works on
> Netscape 4 (not Internet Explorer or Netcape 6).  I would
> recommend using the following instead:

same opinion!!!
here is some code (don't be angry - it's written in php - but there are less 
lines to be posted in php than in java ;-))

file:test2.php
--begin--
<?
  if (isset($forwarded)){
    $wait=rand(10,30);
    sleep($wait); # this simulates the time nedded for processing!
?>
<html><body>
<?= date("H:i:s"); ?> THIS IS THE REAL RESULT AFTER <?= $wait ?> 
SECONDS!</body></html>
<? exit; } ?>
<html><head><title>to be forwarded ...</title></head>
<body>
<?= date("H:i:s"); ?> please wait, while the page is created!
<form action="test2.php" name="forward" METHOD="POST" TARGET="_self">
<input type="hidden" name="forwarded" value="" />
<noscript>
Please activate Javascript or click on the button below!<br />
<input type="submit" />
</noscript>
</form>
<script type="text/javascript" language="JavaScript"><!--
        window.setTimeout("document.forward.submit()", 1000);
//--></script>
</body>
</html> 
--end--

or you can do it with a link to "test2.php?forwarded=" for <noscript>
and window.location.href='test2.php?forwarded=' for <script>


The only question - what about timeouts (client and tomcat)???

regards
michi

> ----- Original Message -----
> From: "Ken Anderson" <ka@pacific.net>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Thursday, 18 April 2002 15:34
> Subject: Re: "processing page"
>
> > see the server push example - countdown.java
> >
> > http://www.servlets.com/jservlet2/examples/ch06/index.html#ex06_13
> >
> > >On 2002.04.17 03:54 Michael Reutter wrote:
> > >>Hi!
> > >>
> > >>PLEASE HELP ME how to implement this with servlets:
> > >>
> > >>A page is requested - but tomcat needs 15-30 seconds to create the
> > >>result!
> > >>What I want is a page "Please wait ... Your page is being
>
> processed", and
>
> > >>the
> > >>moment tomcat has created the output, the real page is being
>
> loaded by
>
> > >>the
> > >>browser!!!
> > >>
> > >>if this isn't a real tomcat-issue, please let me know where to ask
>
> my
>
> > >>question instead!!!!
> > >>
> > >>thanks for any help
> > >>michi
> > >>
> > >>--
> > >>To unsubscribe:
>
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>
> > >>For additional commands:
>
> <mailto:tomcat-user-help@jakarta.apache.org>
>
> > >>Troubles with the list:
>
> <mailto:tomcat-user-owner@jakarta.apache.org>
>
> > >--
> > >To unsubscribe:
>
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>
> > >For additional commands:
>
> <mailto:tomcat-user-help@jakarta.apache.org>
>
> > >Troubles with the list:
>
> <mailto:tomcat-user-owner@jakarta.apache.org>
>
> > --
> > To unsubscribe:
>
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>
> > For additional commands:
>
> <mailto:tomcat-user-help@jakarta.apache.org>
>
> > Troubles with the list:
>
> <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message