Olá pessoal,
preciso fazer algo paracido com
http://extjs.com.br/exemplos/combobox/
so que nao estou conseguindo retornar o valor q gero no jsp para a função jquery, vi q tem q usar json mais nao sei como retornar o objeto do json para a função jquery. usei os seguintes codigos
$.getJson('get_carro.jsp', function(json) {
alert(json);
});
e jsp foi
<%
try{
Connection theConn = null;
MyConnection MyConnection = new MyConnection();
ResultSet rs = null;
String sql = "SELECT * FROM tb_carro ORDER BY placa";
Statement stmt;
theConn = MyConnection.getConnection();
stmt = theConn.createStatement();
rs = stmt.executeQuery(sql);
log log = new log();
JSONArray arrayObj=new JSONArray();
while(rs.next())
{
arrayObj.add(rs.getString("obs"))
}
for(int i=0;i<arrayObj.size();i++)
{
%>
<%=arrayObj.getString(i)%>
<%
}
}
catch (Exception e)
{
e.printStackTrace();
}
%>
Grato