You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gianluca <gm...@sivaspa.com> on 2000/11/29 17:14:17 UTC
temporary page
how can i send to the browser a temporary html page from servlet invoked with post method while it is woking ?
i want that only after my servlet has finished it will response with a sendRedirect method to the client.
Is it possible that ?
Thanks.
Re: temporary page
Posted by "Vik P. Solem" <vs...@viktech.com>.
If you only need to support Netscape then you can use
multi-part/x-mixed-replace . It looks to me like t's not supported by
IE5.0, but I don't know if later versions will support it.
(Also, replacing "x-mixed-replace" with "mixed" may work for you.)
... the nice thing about standards is that there are so many to choose
from. ;-)
-Vik
Here's a sample file.
#!/bin/sh
echo "Content-type:
multipart/x-mixed-replace;boundary=MyFavoriteBoundaryString"
echo ""
cat <<EOF
--MyFavoriteBoundaryString
Content-type: text/html
<title>Working...</title>
<body bgcolor="#f0f0f0">
<h2>Please Wait.</h2>
We are computing that answer.
</body>
--MyFavoriteBoundaryString
EOF
sleep 5
cat <<EOF
--MyFavoriteBoundaryString
Content-type: text/html
<title>Finished</title>
<body>
<h2>The answer is 42.</h2>
Now what was the question again?
</body>
--MyFavoriteBoundaryString
EOF
> Gianluca wrote:
>
> how can i send to the browser a temporary html page from servlet
> invoked with post method while it is woking ?
> i want that only after my servlet has finished it will response with a
> sendRedirect method to the client.
>
> Is it possible that ?
>
> Thanks.
>
--
Vik P. Solem vsolem@viktech.com 781-344-1133
VikTech Systems Inc. Built right, now.
http://www.viktech.com
RE: temporary page
Posted by CPC Livelink Admin <cp...@fitzpatrick.cc>.
Put your processing in a background thread. Put a META Refresh tag in your
HTML to refresh a monitoring servlet priodically. If the processing is not
done, the monitoring servlet returns the same refresh tag, else it
forwards/redirects to the real data you want to show.
Or you could load an applet and use it to maintain contact with the servlet
(I know it can be done, but I don't have the details.)
Regards,
Paul
-----Original Message-----
From: Gianluca [mailto:gmartorella@sivaspa.com]
Sent: Wednesday, November 29, 2000 11:14 AM
To: tomcat-user
Subject: temporary page
how can i send to the browser a temporary html page from servlet invoked
with post method while it is woking ?
i want that only after my servlet has finished it will response with a
sendRedirect method to the client.
Is it possible that ?
Thanks.