This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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???
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
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