Multiple choice technology web technology

What's true about this navigation rule ? /page.jsp

  1. It's valid navigation rule

  2. It will generate RuntimeException due to lack of <from-outcome> tag

  3. page.jsp will never be displayed with this navigation rule

  4. It's not proper (although it's valid) navigation-rule. It should have <from-outcome> tag

Reveal answer Fill a bubble to check yourself
A,D Correct answer
Explanation

The claimed answers are A and D. This navigation rule is technically valid XML (A is true), but it's incomplete because a navigation case should have a tag to specify when this navigation should occur (D is true). Option B is incorrect because it won't throw RuntimeException - it's syntactically valid. Option C is incorrect because page.jsp could be displayed as a default view or through other means.

AI explanation

A is syntactically valid even without a element — JSF treats a case with no from-outcome as a default/catch-all case that matches any outcome returned from the current view, so no exception is thrown and the rule parses fine. That said, omitting from-outcome is considered poor practice because it makes the navigation rule imprecise (it will fire for literally any outcome), so many style guides say it should be included even though the XML is technically legal.