Alex:

Here's an easy way to implement this: Have a hidden variable in each of your
jsps which reflects the name of the jsp you are on and use that in your action
class to prepare the forward (do you see what i'm saying..? I can elaborate if
you'd like..) . You could also use something like request.getRequestURL() (I
think this is right..look in the API to be sure..) if you don't want to use
hidden variables..

Hope this helps,
Geeta

chiu alex wrote:

> Geeta:
>    Yes, that's the point.This refresh action need to exist in many pages.
> looks like it is easy to implement if it can just do a back operation in
> that action class when false return. But actually as I know the action
> doesnot provide such operation. So do you have some idea about this?
>
> Regards,
> Alex
>
> >From: "Geeta Ramani" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: Re: how to implement such an action?
> >Date: Wed, 17 Mar 2004 07:16:00 -0500
> >
> >Alex:
> >
> >Your initial page is just a jsp, right?  So why would you not use your
> action
> >mapping to say something like if "success then forward to newpage.jsp and
> if
> >not forward to samePage.jsp"..?  This will work unless you are using this
> >refresh action in many pages..? In which case, you will have to "remember
> the
> >page" - and that can be done - but if the simpler solution works, that may
> be
> >best, especially since you say you are a newbie..:)
> >
> >Please ignore this note if you have already received emails about your
> >question: our mail server has been *really* slow recently and I can see no
> >replies to your question yet..
> >
> >Regards,
> >Geeta
> >
> >chiu alex wrote:
> >
> > > Hello,everyone,
> > >
> > >      I want to implement such an action which is actually activated by
> > > within the meta:refresh tag. (that means it will be called every 30
> > > seconds). What the action need to do is to make some judgements. If it
> get
> > > true result, it forward to another page, or else it stays at previous
> page
> > > and do nothing, so user will see no change. Obviously, action need to
> > > remember that page, but I do not know how to put it. I am just a newbie
> in
> > > struts.
> > > So could you kindly give me some clue to it. Thanks!
> > >
> > > 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 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]

Reply via email to