JSP Java Tutorial

< HTML>
    
        Design Your Car!
    
 
    
    <% 
        String aCar = "", bCar = "", cCar = "";
        String check1 = "", check2 = "", check3 = "";
        if(request.getParameter("radios") != null) {
           if(request.getParameter("radios").equals("aCar")){
               aCar = "CHECKED";
               check2 = "CHECKED";
           }
           if(request.getParameter("radios").equals("bCar")){
               bCar = "CHECKED";
               check1 = "CHECKED";
               check3 = "CHECKED";
           }
           if(request.getParameter("radios").equals("cCar")){
               cCar = "CHECKED";
               check1 = "CHECKED";
               check2 = "CHECKED";
               check3 = "CHECKED";
           }
       }
    %>
        

Design Your Car!


        
            
                
                    
                        Car
                    
                
                
                    
                                                    <%= aCar %>
                        >
                       Cheese Car
                       

                                                  <%= bCar %>
                       >
                       Turkey Car
                       

                                                   <%= cCar %>
                       >
                       Ham Car
                       

                   
               
            
    
            
                
                    
                        Colors
                    
                
                
                    
                                                    <%= check1 %>
                        >
                        Red
                        

                                                    <%= check2 %>
                        >
                        Yellow
                        

                                                    <%= check3%>
                        >
                        Black