You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kanoza, Douglas (NCI)" <ka...@mail.nih.gov> on 2002/02/21 15:45:49 UTC

How to prevent users from jumping into the middle of a series of pages

I've been using Struts for all of a week now, and think it's the coolest
thing since sliced bread (however, that also means there's a ton I don't
know about it).  

That being said, I'm seeking opinions on the best way to prevent users from
jumping into the middle of an app.  Right now, I have each page put a token
in the session, and I have a custom tag that checks at the top of each to
make sure the previous page's token is there; if not, I redirect to the
first page.  This is working just fine right now (it's a small app), but
already, if I want to insert a new page in the series, I have to change the
next page in the series to look for the appropriate token, and I can see
this getting ugly for a larger app.

The question is: how do you do it?  Is this a pretty common approach, or are
there other ways that some of you have used that are maybe easier to
maintain?

TIA

Douglas M. Kanoza
Senior Developer
Terrapin Systems, LLC
dkanoza@terpsys_dot_com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to prevent users from jumping into the middle of a series of pages

Posted by Ted Husted <hu...@apache.org>.
Generally, Struts developrs tend to pass all control through an Action,
and then to a page. 

This gives the Action the opportunity to vet any workflow concerns. 

So, do not link directly to any JSPs. Link only to Actions, and let the
Action select the appropriate JSP. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services



"Kanoza, Douglas (NCI)" wrote:
> 
> I've been using Struts for all of a week now, and think it's the coolest
> thing since sliced bread (however, that also means there's a ton I don't
> know about it).
> 
> That being said, I'm seeking opinions on the best way to prevent users from
> jumping into the middle of an app.  Right now, I have each page put a token
> in the session, and I have a custom tag that checks at the top of each to
> make sure the previous page's token is there; if not, I redirect to the
> first page.  This is working just fine right now (it's a small app), but
> already, if I want to insert a new page in the series, I have to change the
> next page in the series to look for the appropriate token, and I can see
> this getting ugly for a larger app.
> 
> The question is: how do you do it?  Is this a pretty common approach, or are
> there other ways that some of you have used that are maybe easier to
> maintain?
> 
> TIA
> 
> Douglas M. Kanoza
> Senior Developer
> Terrapin Systems, LLC
> dkanoza@terpsys_dot_com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to prevent users from jumping into the middle of a series of pages

Posted by James Mitch <jm...@yahoo.com>.
I am assuming that you are writing a wizard-like series of pages where the user hits next, next,
next, and then finish (or however you want it).

I posted a pretty good (I think) bit of info on this process last week.

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg23803.html

It works great for me.


Good Luck

James Mitchell

--- keithBacon <ke...@yahoo.com> wrote:
> I'm not the expert on this - but search the archive for 'workflow'
> 
> --- "Kanoza, Douglas (NCI)" <ka...@mail.nih.gov> wrote:
> > I've been using Struts for all of a week now, and think it's the coolest
> > thing since sliced bread (however, that also means there's a ton I don't
> > know about it).  
> > 
> > That being said, I'm seeking opinions on the best way to prevent users from
> > jumping into the middle of an app.  Right now, I have each page put a token
> > in the session, and I have a custom tag that checks at the top of each to
> > make sure the previous page's token is there; if not, I redirect to the
> > first page.  This is working just fine right now (it's a small app), but
> > already, if I want to insert a new page in the series, I have to change the
> > next page in the series to look for the appropriate token, and I can see
> > this getting ugly for a larger app.
> > 
> > The question is: how do you do it?  Is this a pretty common approach, or are
> > there other ways that some of you have used that are maybe easier to
> > maintain?
> > 
> > TIA
> > 
> > Douglas M. Kanoza
> > Senior Developer
> > Terrapin Systems, LLC
> > dkanoza@terpsys_dot_com
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > 
> 
> 
> =====
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Search the archive:-
> http://www.mail-archive.com/struts-user%40jakarta.apache.org/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Keith Bacon - Looking for struts work - South-East UK.
> phone UK 07960 011275
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to prevent users from jumping into the middle of a series of pages

Posted by keithBacon <ke...@yahoo.com>.
I'm not the expert on this - but search the archive for 'workflow'

--- "Kanoza, Douglas (NCI)" <ka...@mail.nih.gov> wrote:
> I've been using Struts for all of a week now, and think it's the coolest
> thing since sliced bread (however, that also means there's a ton I don't
> know about it).  
> 
> That being said, I'm seeking opinions on the best way to prevent users from
> jumping into the middle of an app.  Right now, I have each page put a token
> in the session, and I have a custom tag that checks at the top of each to
> make sure the previous page's token is there; if not, I redirect to the
> first page.  This is working just fine right now (it's a small app), but
> already, if I want to insert a new page in the series, I have to change the
> next page in the series to look for the appropriate token, and I can see
> this getting ugly for a larger app.
> 
> The question is: how do you do it?  Is this a pretty common approach, or are
> there other ways that some of you have used that are maybe easier to
> maintain?
> 
> TIA
> 
> Douglas M. Kanoza
> Senior Developer
> Terrapin Systems, LLC
> dkanoza@terpsys_dot_com
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Search the archive:-
http://www.mail-archive.com/struts-user%40jakarta.apache.org/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Bacon - Looking for struts work - South-East UK.
phone UK 07960 011275

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>