Amigos lo que llevo hasta los momentos es esto practicamente parecido a lo que hizo este pana
http://dahicotux.wordpress.com/2010/...id-plugin-jsp/
Código:
<%--
Document : mostrarHumedad
Created on : 26/04/2010, 11:12:47 AM
Author : haroldv
--%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="javax.sql.*" %>
<%@ page import="Clases.BaseDatos" %>
<%@ page contentType="text/xml" %>
<%
String driver = "org.postgresql.Driver";
String connectString = "jdbc:postgresql://localhost/dptoclimatologia";
String user = "postgres";
String password = "17636325";
Class.forName(driver).newInstance();
Connection conn = DriverManager.getConnection(connectString, user,password);
ResultSet rst = conn.createStatement().executeQuery("select id, fecha from humedad");
%>
<%
response.setContentType("text/xml");
response.setCharacterEncoding("utf-8");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
String xml="";
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n\n";
xml= xml + "<root>\n";
xml = xml + "<rows>\n";
while(rst.next()){
System.out.println("HOLABOBO");
xml= xml +"<row id = "+rst.getInt("id")+">\n " +
"<cell>"+rst.getInt("id")+"</cell>\n " +
" <cell>"+rst.getString("fecha")+"</cell>\n " +
" </row>\n";
}
xml = xml +"</rows>\n";
xml = xml + "</root>";
System.out.println(xml);
%>
y Me Muestra esto
Código:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<rows>
<row id = 1>
<cell>1</cell>
<cell>2010/02/04</cell>
</row>
<row id = 3>
<cell>3</cell>
<cell>2010/11/11</cell>
</row>
<row id = 4>
<cell>4</cell>
<cell>2010/06/09</cell>
</row>
<row id = 5>
<cell>5</cell>
<cell>2010/02/01</cell>
</row>
<row id = 6>
<cell>6</cell>
<cell>2010/06/02</cell>
</row>
<row id = 7>
<cell>7</cell>
<cell>2010/05/02</cell>
</row>
<row id = 8>
<cell>8</cell>
<cell>2010/05/17</cell>
</row>
<row id = 9>
<cell>9</cell>
<cell>2010/03/23</cell>
</row>
<row id = 10>
<cell>10</cell>
<cell>2010/04/10</cell>
</row>
<row id = 11>
<cell>11</cell>
<cell>2010/03/18</cell>
</row>
<row id = 12>
<cell>12</cell>
<cell>2010/06/03</cell>
</row>
<row id = 13>
<cell>13</cell>
<cell>2010/02/19</cell>
</row>
<row id = 14>
<cell>14</cell>
<cell>2010/04/31</cell>
</row>
<row id = 15>
<cell>15</cell>
<cell>2010/02/12</cell>
</row>
<row id = 17>
<cell>17</cell>
<cell>2010/07/12</cell>
</row>
<row id = 16>
<cell>16</cell>
<cell>2010/01/01</cell>
</row>
<row id = 2>
<cell>2</cell>
<cell>2010/01/02</cell>
</row>
<row id = 18>
<cell>18</cell>
<cell>2010/01/20</cell>
</row>
</rows>
</root>
como hago para esos datos asignarlos a un xml creado x mi para que asi al leerlo el JqGrid Los coloque de una vez o como asignarselos de una vez al Jqgrid ?