| Author |
Need help from Struts guru
|
Kelly Walker
Greenhorn
Joined: Sep 09, 2003
Posts: 24
|
|
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???
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56547
|
|
|
Moving to the Struts forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bruno Korcinski
Greenhorn
Joined: Jun 03, 2003
Posts: 16
|
|
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
|
 |
Srikanth Shenoy
author
Ranch Hand
Joined: Jan 24, 2004
Posts: 184
|
|
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
|
Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
|
 |
Emilio Butrage�o
Greenhorn
Joined: Mar 05, 2004
Posts: 8
|
|
|
I will agree with Srikanth, that is probably the easiest solution. Good luck.
|
 |
Kelly Walker
Greenhorn
Joined: Sep 09, 2003
Posts: 24
|
|
Fantastic. http://www.livinglogic.de/Struts/ Just what I wanted.
|
 |
 |
|
|
subject: Need help from Struts guru
|
|
|