Tive que substituir < e > por .. pois esta dando erro no php
pessoal tenho a seguinte pagina.jsp…que no primeiro select executa esse JavaScript:
..script language="JavaScript"..
function buscaContato(quais){
if(quais.selectedIndex!=''){
var cliente=quais.value;
document.location=('CadOs.jsp?cliente='+cliente+'&id='+cliente);
}
}
../script..
selects:
..select name="cliente" id="cliente" onChange="buscaContato(this)"..
..option value=""..Selecione o cliente../option..
..%
int tipo=1;
rs=con.executeQuery("select codigo,nome from os_colaboradores where tipo="+tipo);
String id=request.getParameter("id");
while(rs.next()){
int codigo=rs.getInt("codigo");
String nome=rs.getString("nome");
if(id!=null){
if((String)codigo.equals(id)){%..
..option value=..%=codigo%.. selected.. ..%=codigo%..-..%=nome%.. ../option..
..%}else{%..
..option value=..%=codigo%.. .. ..%=codigo%..-..%=nome%.. ../option..
..%}
}else{%..
..option value=..%=codigo%.. .. ..%=codigo%..-..%=nome%.. ../option..
..%}
%..
../select..
..select name="solicitante" id="select2"..
..option value=""..selecione o Contato../option..
..%
String cliente=request.getParameter("cliente");
if(cliente!=null){
rs=con.executeQuery("select codigo,nome from os_contatos where cliente="+cliente+"order by codigo");
while(rs.next()){
int codigo=rs.getInt("codigo");
String nome=rs.getString("nome");
%.. ..option value=..%=codigo%.. .. ..%=codigo%..-..%=nome%.. ../option..
..%}
}
%..
../select..
..select name="tecnico" id="select"..
..%tipo=2;
rs=con.executeQuery("select codigo,nome from os_colaboradores where tipo="+tipo);
while(rs.next()){
int codigo=rs.getInt("codigo");
String nome=rs.getString("nome");
%.. ..option select.. ..%=codigo%..-..%=nome%.. ../option..
..%}
%..
../select..
soh q tah dando o seguinte erro… o detalhe eh que eu naum tenho nenhum try/catch
Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat\work\Standalone\localhost\OS\CadOs_jsp.java:276: 'catch' without 'try'
} catch (Throwable t) {
^
C:\Tomcat\work\Standalone\localhost\OS\CadOs_jsp.java:38: 'try' without 'catch' or 'finally'
try {
^
C:\Tomcat\work\Standalone\localhost\OS\CadOs_jsp.java:286: '}' expected
^
3 errors