Hi,

    I have an application that required workflow like jsp pages. I created an
action name CreateUserAccountAction that extends the DispatchAction and a form
MultiCreateUserAccountForm that extends the ValidatorForm.  The reset method of
the MultiCreateUserAccountForm will clear all attributes under the current
session  when the getPage() is equal to 2. The  CreateUserAccountAction has two
methods that are similar to the execute method that are named
createUserAccountActionOne and createUserAccountActionTwo.

    The createUserAccountActionOne method calls the
MultiCreateUserAccountForm.validate() method to validate the user input fields of
the firstPage.jsp. Second, it calls the setPage() method with  "1" as its input
parameter. Finally, it calls the MultiCreateUserAccountForm.setMethodToDispatch()
with "createUserAccountActionTwo" as the input parameter.
 
    The createUserAccountActionTwo method calls the
MultiCreateUserAccountForm.validate() method to validate the user input fields of
the secondPage.jsp. Secondly, it remove the obsolete form bean with
session.removeAttribute(mapping.getAttribute()). Thirdly, it calls the setPage()
method with  "2" as its input parameter. Finally, it calls the reset() method to
clear all attributes under the current session.

    If there is a required field that is missing (leaved out) on the
firstPage.jsp when the submit button is pressed. A new dialog box poped up on the
screen with the validation message from the resource property file. When every
field is validated the controll is forwarded to the secondPage.jsp.

    If there is a required field that is missing (leaved out) on the
secondPage.jsp when the submit button is pressed. A blank page is showed on the
windown  without a new dialog box shows up on the screen. The server.log
indicates an error occurred and returns to the same page (secondPage.jsp). To
fixed this problem, I pressed the back page button of the browser and correctly
filled in all missing fields. When every field on the second page is filled
correctly according to the validation rules then the controll is correctly
forwarded to the firstPage.jsp.

My question is following:
    Why don't I get a pop up dialog box with error messages ?
    Why the secondPage.jsp did not get executed?
    Why do I get a black screen?

****** This are action mapping ***********
<action
            path="/multiCreateUserAccountFirstSubmit"
            type="com.wlwa.CreateUserAccountAction"
            name="multiCreateUserAccountForm"
            scope="session"
            validate="true"
            parameter="methodToDispatch"
            input="/CreateUserAccountLink.jsp">
         <forward name="success" path="/CreateUserAccountSecondLink.jsp" />
    </action>

    <action
            path="/multiCreateUserAccountSecondSubmit"
            type="com.wlwa.CreateUserAccountAction"
            name="multiCreateUserAccountForm"
            scope="session"
            validate="true"
            parameter="methodToDispatch"
            input="/CreateUserAccountSecondLink.jsp">
         <forward name="success" path="/CreateUserAccountLink.jsp"   />
    </action>

Kam Lung Leung

Kam Lung Leung
System Architect
Wireless Web Access Inc.
(303) 627-9684

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to