• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help from Struts guru

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a Struts 1.1 webapp.
The webapp is a wizard style app. The flow is defined in the struts -conf.
For example:
page a forwards to page b.
page b forwards to page c.
page c forwards to page d.
My question:
How do I maintain the integrity of the flow?
How do I stop a user who is viewing page a from jumping straight to page d by simply entering /paged.do in the browser.
I must ensure my follows the correct flow and cannot circumvent the flow. He/she must vist a - b - c - d in that order. If they do not then we will forward them back to the start.
I need a generic solution. I would like to have the logic in an extended ActionServlet perhaps. I can't think of a simple solution though.
Experts can you help???
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Struts forum.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I dont know if struts has some system to do it/i'm beginner/
just only came om my mind ..put to the session scope attribute let say
flow="" and in page "a" you will put "a" in page b you will put "ab"..and so onin page b you can check flow=="a" ??? if not forward to page "a"...
hmmm
I dont know if it's good solotion or not...
Igor
 
author
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kelly,
Your scenario is a classic case for using Struts workflow extensions.
Dont start developing anything by yourself.
It will turn into a project by itself.....
Go to www.livinglogic.de and download the workflow extension.
Their tutorial and a simple dmoe is quite good and enough to realize to how to do it.
You have to basically modify your struts-config.xml and use WorkflowActionMappings, WorkflowRequestProcessor etc...
Hope this helps.
Srikanth
Author: Struts Survival Guide - Basics to Best Practices
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will agree with Srikanth, that is probably the easiest solution. Good luck.
 
Kelly Walker
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fantastic.
http://www.livinglogic.de/Struts/
Just what I wanted.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic