20. Strut-config.xml For requests that hit URL=“/logon” The frame work will invoke execute() on an instance of class com.codementor.LogonAction Store request parameters in form variable “LogonForm” which is defined in another location in the xml document. If the logical name returned by perform() is “failure” go to page “/failure.jsp” If the Logical name returned by perform() is “success” go to “/success.jsp” <action path=" /logon “ type= “ com.codementor.LogonAction ” name=" LogonForm " <forward name=" failure " path=" /failure.jsp " /> <forward name=" success " path=" /success.jsp " /> </action>
97. Bean:Define <bean:define id=“employeeList“ name=“selectEmployeesForm“ property=“employeeList“ type="java.util.Collection"/> Defines a referenceable variable named employeeList which is assigned that value Of the property employeeList in the form Bean. Collection employeeList = selectEmployeesForm.getEmployeeList();
98.
99.
100.
101.
102.
103.
104.
105.
106. Bean:Write JSP Equivalent: <%= modelForm.getClientName() %> If the named object is an object you do not have to define a property Ex: <bean:write name=“id” /> This commonly happens with a bean define or an id assigned in an iterator