How to apply choose tag in JSP?

The works like a Java switch statement in that it lets you choose between a number of alternatives. Where the switch statement has case statements, the tag has tags. Just as a switch statement has the default clause to specify a default action, has as the default clause.

Attribute

  • The tag does not have any attribute.

  • The tag has one attributes which is listed below.

  • The tag does not have any attribute.

The tag has the following attributes ?

Attribute Description Required Default
test Condition to evaluate Yes None

Example


   
      <choose> Tag Example</choose>
   
   
      
      

Your salary is :

                            Salary is very low to survive.                                 Salary is very good.                                 No comment sir...                

The above code will generate the following result ?

Your salary is : 4000
Salary is very good.
Updated on: 2019-07-30T22:30:25+05:30

333 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements