Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts Users »

RE: how to automatically forward user's page to a html link at speified time

赵 平

2004-03-12

Replies:

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 question
is can the timer task generate a request?


>From: <Shahak.Nagiel@(protected)>
>Reply-To: "Struts Users Mailing List" <struts-user@(protected)>
>To: <struts-user@(protected)>
>Subject: RE: how to automatically forward user's page to a html link at
speified time
>Date: Fri, 12 Mar 2004 11:25:28 -0500
>
>If the intent is to forward to a "home" or "logout" page after a period of
inactivity, using a javascript method or META:REFRESH tag is the only way
to do so out of the context of a request, since--as you said--in a 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- or
globally-scoped timer and redirect based on that criteria, but it doesn't
sound like that's what you're after...
>
>-----Original Message-----
>From: alexstoneham@(protected)]
>Sent: Friday, March 12, 2004 11:18 AM
>To: struts-user@(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 have no
>idea how to forward a page inside the TimerTask class not inside action as
>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: struts-user-unsubscribe@(protected)
>For additional commands, e-mail: struts-user-help@(protected)
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@(protected)
>For additional commands, e-mail: struts-user-help@(protected)
>

_________________________________________________________________
锟斤拷j锟斤拷锟斤拷锟斤拷呀锟斤拷薪锟斤拷锟斤拷锟绞癸拷锟�MSN Messenger: http://messenger.msn.com/cn


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@(protected)
For additional commands, e-mail: struts-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.