Multiple choice technology web technology

What is wrong with the following code ? 4. <% 5. if(strPassword.equals("boss")) 6. { 7. 8. } 9. else 10. { 11. 12. } 13. %>

  1. Unmatched bracket in for statement

  2. Flush attribute must be false

  3. Keyword 'file' should be used instead of 'page' in the <jsp:forward/> action

  4. Actions cannot be used within scriptlet blocks

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

JSP actions (like ) are XML-based tags and cannot be embedded within scriptlet blocks (<% %>). Scriptlets contain Java code, while actions are processed by the JSP container at a different phase. To use actions conditionally, you would need to structure the code differently or use scriptlets exclusively.