org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

0

At the time I am presented with an error that I have not been able to resolve in different forums.

  

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for> JSP

     

PWC6199: Generated servlet error:   source value 1.5 is obsolete and will be removed in a future release

     

PWC6199: Generated servlet error:   target value 1.5 is obsolete and will be removed in a future release

     

PWC6199: Generated servlet error:   To suppress warnings about obsolete options, use -Xlint: -options.

     

PWC6199: Generated servlet error:   'catch' without 'try'

     

PWC6199: Generated servlet error:   'finally' without 'try'

     

PWC6199: Generated servlet error:   'try' without 'catch' or 'finally'

     

PWC6199: Generated servlet error:   reached end of file while parsing

I need help !!!

==============================content================================-->
            <!--
            RECUPERAMOS LOS DATOS A MODIFICAR
            -->
            <%           
               String ofi = request.getParameter( "ofi" );
               String micro = request.getParameter("micro");
               String idP = request.getParameter("idP");
               String nomP = request.getParameter( "nomP" );
               String dirP = request.getParameter("dirP");
               String codP = request.getParameter("codP");
            %>
        <section id="content"><div class="ic"></div>
            <div class="main">
                <div class="container_12">
                    <div class="wrapper">
                                            <article class="grid_8" >
                            <div class="indent-top indent-left">
                                                       <br/>
                                                        <h3>EDITAR PUNTO</h3>
                                                            <form id="form-agregar" method="post" name="form1" action="editarPunto">                    
                                                                <fieldset>
                                                                      <legend align="right" >Datos Punto a Editar</legend>
                                                                            <label><span class="text-form2">Oficina:</span>
                                                                             <select name="txtOficina" onchange="">
                                                                                <%                                                                             
                                                                                 // Se instancia los recursos del modelo y se da respuesta al request 
                                                                                    Servicios s = new Servicios( );
                                                                                    ResultSet droplst = s.Oficinas( 0, "" );
                                                                                    int oficina ;
                                                                                    if(droplst != null){                                                                                    
                                                                                        while( droplst.next( ) )
                                                                                        { 
                                                                                             if(droplst.getString( 2 ).equals(ofi)){
                                                                                                out.println("<option value='"+ droplst.getInt( 1 ) +"' selected>"+ droplst.getString( 2 ) +"</option>");
                                                                                            }else{
                                                                                                out.println("<option value='"+ droplst.getInt( 1 ) +"'>"+ droplst.getString( 2 ) +"</option>");
                                                                                            }                                                                                                                                                                                 
                                                                                        }
                                                                                    }  
                                                                                %>                                                                           
                                                                            </select></label> 
                                                                            <label><span class="text-form2">Micro-Zona:</span>
                                                                                <select name="txtMZ" onchange="">
                                                                                <%  
                                                                                    String MZ = "1";//microzonas en Oficina
                                                                                    ResultSet droplst2 = s.consultarMicroZona(0, MZ ,"" );

                                                                                    if(droplst2 != null){                                                                                    
                                                                                        while( droplst2.next( ) )
                                                                                        {      
                                                                                            if(droplst.getString( 2 ).equals(micro)){
                                                                                                out.println("<option value='"+ droplst.getInt( 1 ) +"' selected>"+ droplst.getString( 2 ) +"</option>");
                                                                                            }else{
                                                                                            out.println("<option value='"+ droplst2.getInt( 1 ) +"'>"+ droplst2.getString( 2 ) +"</option>");                                                                                        
                                                                                        }
                                                                                    }  
                                                                                %>                                                                           
                                                                            </select></label>                                                                       
                                                                             <label><span class="text-form2">Id del Punto:</span><input name="txtIdP" type="text"  type="text"  value="<%out.println(idP);%>" readonly="readonly"/></label>
                                                                            <label><span class="text-form2">Nombre del Punto:</span><input name="txtNomP" type="text"  type="text"  value="<%out.println(nomP);%>" required="required"/></label>
                                                                            <label><span class="text-form2">Direccion del Punto:</span><input name="txtDrP" type="text"  type="text"  value="<%out.println(dirP);%>" required="required"/></label>
                                                                            <label><span class="text-form2">C&oacute;digo del Punto:</span><input name="txtCodP" type="text"  type="text"  value="<%out.println(codP);%>" required="required"/></label>
                                                                    </fieldset> 
                                                                    <br/>    
                                                                    <button type="submit">AGREGAR</button>
                                                                    <button type="reset">CANCELAR</button>
                                                            </form>   

                            </div>
                        </article>
                                            <article class="grid_4">
                            <div class="indent-top indent-left">
                                <div class="wrapper margin-bot">
                                                                <div class="box-1">
                                                                <strong class="number img-atras" onclick="location = 'inicio.jsp'"></strong>
                                                                <p class="text-3">VOLVER AL MENU</p>
                                                                </div>
                                </div>     
                            </div>
                        </article>
                                    </div>
                </div>
            </div>
        </section>
        <!--

Hello; I still have the same problem; But to be able to advance omiti this part a few days nevertheless I am presented with the same inconvenience ...

I noticed that the problem is presented in the comparison:

if(droplst2 != null){                                                                                    
                                                                                    while( droplst2.next( ) )
                                                                                    {      
                                                                                        if(droplst.getString( 2 ).equals(micro)){
                                                                                            out.println("<option value='"+ droplst.getInt( 1 ) +"' selected>"+ droplst.getString( 2 ) +"</option>");
                                                                                        }else{
                                                                                        out.println("<option value='"+ droplst2.getInt( 1 ) +"'>"+ droplst2.getString( 2 ) +"</option>");                                                                                        
                                                                                    }}

The problem with this is that I need to make the comparison so that the previously selected data comes out by default. I have 2 drop drow list on the page if I delete 1 of those two comparisons I do not skip the exception ...

Any ideas?

As always, thank you very much !!

    
asked by Andres Felipe Diaz 30.03.2017 в 16:36
source

1 answer

0

Hello people after trying many solutions the solution was to use the tags

//<![CDATA[// ... Codigo .... ]]>

So when reading in xml the scriptlets are not separated.

The jsp code stayed like this:

int num = 0;
                                                                             // Se instancia los recursos del modelo y se da respuesta al request 
                                                                                Servicios s = new Servicios( );
                                                                                ResultSet droplst = s.Ciudad( num , "" );                                                                                
                                                                                //<![CDATA[
                                                                                if(droplst != null){                                                                                    
                                                                                    while( droplst.next( ) )                                                                                          
                                                                                    {    
                                                                                         if (droplst.getString( 2 ).equals(ciuU)){
                                                                                         //if((ciuU == null && droplst.getString( 2 ) == null) || ciuU.equalsIgnoreCase(droplst.getString( 2 ))){//Por defecto
                                                                                            out.println("<option value='"+ droplst.getInt( 1 ) +"' selected>"+ droplst.getString( 2 ) +"</option>");
                                                                                        }else{
                                                                                              out.println("<option value='"+ droplst.getInt( 1 ) +"'>"+ droplst.getString( 2 ) +"</option>");
                                                                                        } 

                                                                                    }
                                                                                }
                                                                                //  ]]>
                                                                                droplst.close();
    
answered by 03.04.2017 в 22:26