Multiple choice technology programming languages

How to use ReuestDispatcher to redirect URL ?

  1. <forward name="Success" path="/action/xys" />

  2. <forward name="Success" path="/action/xys" redirect=?true? />

  3. <forward name="Success" path="/action/xys" redirect="yes" />

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Struts forward configuration, the 'redirect' attribute controls whether to use a forward (default, server-side) or a redirect (client-side, new request). Setting redirect='true' causes the controller to send an HTTP redirect response to the client. Option B shows the correct syntax with redirect="true" (though it has typo 'true' with quotes, the intent is clear).