If you used one action to accept user input like processRegForm.do, and another to display the page like showRegForm.do, you could logically separate input and output phases. See this for some insights: http://wiki.apache.org/struts/DataEntryForm
Michael. On 4/11/06, Pham Anh Tuan <[EMAIL PROTECTED]> wrote: > Hi all, > > case: > I use Tiles and Velocity for presentation layer > > com.project.GeneratedKeyAction: will generated and register information of > code or capcha (or do something here - retrieve list of user type from DB, > etc) to session scope. > <!-- go to Information & Registration page - this page include registration > information and registration form --> > <action path="/rw/gotoInfoPage" > type="com.project.GeneratedKeyAction" scope="request" > validate="false"> > <forward name="success" path="aInfoPage"/> > </action> > > after user fullfill registration form, he/she submits this form with action > /rw/processRegForm.do > <!-- process registration --> > <action name="regFormBean" path="/rw/processRegForm" > type="com.project.ProcessRegistration" scope="request" > validate="false"> > <forward name="success" path="/rw/gotoInfoPage.do" redirect="true" /> > <forward name="failure" path="/rw/gotoInfoPage.do" redirect="true" /> > <forward name="systemFailure" path="aLoi"/> > </action> > > as you saw, whether or not this registration process is successfull, I want > the use back to the info page (/rw/gotoInfoPage.do), if there's any error > messages /successful messages, this will be showed in the info page. > > I read Struts document, and it said that, when I use redirection in forward > tag, it means all values which I saved in request scope will be empty, but > ... If I don't use redirection in forward tag (to forward to the info page - > "/rw/gotoInfoPage"), user will see url: /rw/processRegForm.do after the > registration process, and if user refresh this page which has the url: > /rw/processRegForm.do, errors will occur because there's no form bean or any > data to process :( > > but... > > I couldn't save all my error message or any messages in session scope, > because, where could I remove that messages from session scope after process > was successful :( > > Again, plz help me to solve this problem! > > thanks in advance :( > > bowlkhin > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]