inside action mappings there are multiple actions ,now for every action thrs a forward..thus action is the parent element and forward is the child element ....now what will happen if i set the redirect attribute of forward element to false ......
Do you understand what happens when you set this value to true? Basically, setting this value to false or leaving off this attribute (the default is false) will simply forward to the given resource. The biggest difference is that if this value is true, then the browser will initiate another request which will create a brand new request object causing any values set on the request to be lost.
Joined: Dec 05, 2006
You mean to say that the redirect attribute is similar to senredirect .Can you please tell me any scenario when i can set this attribute true.
Joined: Feb 08, 2006
Almost any time that I am forwarding to another action I set redirect to true. For example...the user clicks the Save button on the User page and the action SaveUser.do is called. When that action completes it forwards (with redirect = true) to DisplayUserList.do which shows an updated list of users. One issue with not setting redirect = true is that the user would be looking at the user list page but the URL in the browser is still SaveUser.do. If the user clicks the refresh link it will try to call SaveUser.do again which is likely to cause errors.