Thanks for your explanation, let me check if the meta:refresh tag can be supported in most of browsers
From: "Niall Pemberton" <[EMAIL PROTECTED]>speified time
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: how to automatically forward user's page to a html link at
Date: Sat, 13 Mar 2004 02:08:57 -0000(e.g.
He's suggesting you use the javascript or method or META:REFRESH tag.
if you put a meta:refresh tag in the <head> of the document, the browser
will re-direct to a specified url after a specified number of seconds
content=300 means it will re-direct after 300 seconds).custom
<head> <meta http-equiv="refresh" content="300; url='/myWebApp/myAction.do'" /> </head>
What you would need to do is calculate out how many seconds it is until
9:00pm when you generate the page in order to specify the right amount of
time in the "content". One way to do this would be to write your own
tag and make the time configurable for your web app.question
What I don't know is what browsers support the meta:refresh tag.
Niall
----- Original Message ----- From: "赵 平" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 13, 2004 1:36 AM Subject: RE: how to automatically forward user's page to a html link at speified time
> Thanks,I need to forward the page to another link(that is another
> website),obviously such forward is not orginated from a user request,so
> maybe I can auto generate a request at that time,does it mean I have to
use
> javascript to do it? I think struts can, but just not find the key
> solution.
>
> As you said, if I make all the action class to check the timer,but the
> action itself is called only when a request is submitted. so the
> is can the timer task generate a request?at
>
>
> >From: <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: RE: how to automatically forward user's page to a html link
> speified timeperiod
> >Date: Fri, 12 Mar 2004 11:25:28 -0500
> >
> >If the intent is to forward to a "home" or "logout" page after a
ofway
> inactivity, using a javascript method or META:REFRESH tag is the only
> to do so out of the context of a request, since--as you said--in aor
separate
> thread or servlet, any timer wouldn't have access to the action class.
> >
> >You could, I suppose, have all your action classes check some session-
> globally-scoped timer and redirect based on that criteria, but itdoesn't
> sound like that's what you're after...have
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Friday, March 12, 2004 11:18 AM
> >To: [EMAIL PROTECTED]
> >Subject: how to automatically forward user's page to a html link at
> speified time
> >
> >
> >Hi, all
> >
> > I want the struts application have an internal timer. When the
> >specified time(like 9:00pm) arrive, the user's current page should be
> >forwarded to another html link. I know the java.util.timer and
> >java.util.TimerTask can do such thing. Maybe I can put the timer class
> >stuff in HttpSessionListener or ServletContextListener, but I just
noaction
> >idea how to forward a page inside the TimerTask class not inside
ashttp://messenger.msn.com/cn
> >usual?
> >
> > So did anyone come across the similar problem? Could you shed me
> light
> >on it?
> >
> > Thanks in Advance.
> >
> >Best Regards,
> >Alex
> >
> >_________________________________________________________________
> >免费下载 MSN Explorer: http://explorer.msn.com/lccn/
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:
> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

