I still have couple of questions before checking out the 1.3 source code. (1) The first one is where to check 1.3 out from? Ok, I might have not been following the list, but http://struts.apache.org does not have links to 1.3 source code nor it explains how to set up Subversion. I think I knew where to check it out from, but forgot ;-((
Also, I would like to get all sources in a jar file with a build script. I do not really want to check out file by file from repository unless this is really justified. (2) How tight is integration between commands from chain-config.xml and actions from struts-config.xml ? Should not it be possible to define actions in chain-config.xml as commands? I know that actions have more attributes and they have <forward> elements, but tighter integration would be a great thing. I look at Vic's example [3]: === cut here === <action path="/testAct" command="testCmd" catalog="testCat" name="testBean" scope="session" validate="false"> <forward name="Success" path="/WEB-INF/modules/test/inf/test.jsp"/> </action> The classes (now there can be more than one!) to be executed in the testCmd chain are specified in a chain-config.xml, similar to struts-config.xml <catalog name="testCat"> <chain name="testCmd"> <command name="testCmd1" className="com.mD.test.NewCmd"/> <command name="testCmd2" className="com.mD.test.New2Cmd"/> </chain> </catalog> === cut here === Instead of one config file I have two files now. Um, I would rather had less XML than more. Command returns true or false, Action returns ActionForward. How does this work? Where the action forward is returned to? Is it set into the context? (4) Neither Bill's article nor Vic's example stress out the scope of the Context. Is it filled out for each request? Can I set up the scope for the Context? Considering that Context has accessors for request, session and servletcontext, it should be a long-term object. Whom it belongs to? Should access to it be synchronized? (5) It is nice that process() is changed into a chain, but what are the relations and dependencies between the commands? How do they affect each other? What do they store in the context and what do they expect? What would be the effect of removing a standard command or adding a new one? This question does not require immediate answer, rather a reminder for better docs ;-) (6) Bill's article [2] shows a login interceptor implemented as command, but all it does is displays 403 error. Well, it reminds that request and response objects did not go nowhere, and can be used, but what I would like to see is not short-circuiting the chain, but redirecting to a login action. I am not sure how this is going to work in the chain. Should I somehow preselect the interceptor action (login action) before SelectAction command? Or exactly in this command? What about other commands like PopulateActionForm or ValidateActionForm? I do not need to execute them, but I need to execute CreateAction and ExecuteAction, which are in the end of the chain. How do I jump to them across other commands that I do not need? Or this use case should be handled by creating a new small chain specifically for login action, which would include only SelectAction, CreateAction and ExecuteAction, and then short-circuiting? References: [1] A Look at Commons Chain, Part 1: http://www.onjava.com/lpt/a/5671 [2] A Look at Commons Chain, Part 2: http://www.onjava.com/lpt/a/5693 [3] Better Code With Struts 1.3: http://www.infonoia.com/en/content.jsp?d=inf.05.06&pr=1 Michael. On 9/8/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Thanks, Joe. > > I jumped a gun a little, since the articles at OnJava give pretty good > understanding of Struts chains: > > http://www.onjava.com/lpt/a/5671 > http://www.onjava.com/lpt/a/5693 > > I need to play with it a bit. Seems that I will be able to use > ActionForm only (or whatever other class I decide to use) for > collecting request paramaters as well as for event handling, and to > throw Action away altogether ;-) > > Michael. > > On 9/8/05, Joe Germuska <[EMAIL PROTECTED]> wrote: > > >Considering that 1.3 is on the radar, there should be better docs for > > >this crucial feature, should not it? > > > > Indeed it should. Alas, last time I set out to write docs, I instead > > realized a bunch of things that had to be changed (rather than write > > doc thinking "it should be like this, but it's really like that"...). > > > > Since then, I've had only enough time for Struts as needed to keep up > > with stuff at work. I will gladly try to answer questions on the > > lists, and all the better if those answers help to support > > documentation. > > > > >I would contribute writing it, > > >but I don't know how to use it yet ;-) > > > > It's actually pretty straightforward; if you have time and interest, > > dive in and let us know what your questions are. > > > > Joe > > > > -- > > Joe Germuska > > [EMAIL PROTECTED] > > http://blog.germuska.com > > "Narrow minds are weapons made for mass destruction" -The Ex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]