Посмотрел ваершарком. Так и есть, от меня не уходит ответ (n_fields=0). фаерволов нет.
Вот код сервлета
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
int Result = 0;
try {
response.setContentType("text/html;charset=UTF-8");
// Получение из http-запроса значения параметра lasname
String lastname = request.getParameter("output_field_value_0");
CallableStatement proc = null;
//PrintWriter out = response.getWriter();
ServletOutputStream out = response.getOutputStream();
url = "jdbc:oracle:thin:@" + server + ":" + port + ":" + sid;
System.out.println(url);
Class.forName(driverName);
connection = DriverManager.getConnection(url, username, password);
//con = connectionPool.getConnection();
proc = connection.prepareCall("{ ? = call RT.oms_import_info_create(?, ?, ?) }");
proc.registerOutParameter(1, Types.INTEGER);
proc.setInt(2, 1);
proc.setInt(3, 120);
proc.setString(4, lastname);
proc.execute();
int age = proc.getInt(1);
//System.out.println("connecting: " + url);
if(connection.equals(null))
//isConnected = false;
Result = 0;
else
//isConnected = true;
Result = 1;
connection.close();
StringBuilder sb = new StringBuilder(1500);
sb.append("n_fields=0");
//out.write("n_fields=1&field_0=123");
out.write(sb.toString().getBytes("UTF8"));
//out.close();
}
catch (Exception ex) {
ex.printStackTrace();
throw new ServletException(ex);
}
//Return result;
}
Может кто-нить найдет ошибку?
Вот код сервлета
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
int Result = 0;
try {
response.setContentType("text/html;charset=UTF-8");
// Получение из http-запроса значения параметра lasname
String lastname = request.getParameter("output_field_value_0");
CallableStatement proc = null;
//PrintWriter out = response.getWriter();
ServletOutputStream out = response.getOutputStream();
url = "jdbc:oracle:thin:@" + server + ":" + port + ":" + sid;
System.out.println(url);
Class.forName(driverName);
connection = DriverManager.getConnection(url, username, password);
//con = connectionPool.getConnection();
proc = connection.prepareCall("{ ? = call RT.oms_import_info_create(?, ?, ?) }");
proc.registerOutParameter(1, Types.INTEGER);
proc.setInt(2, 1);
proc.setInt(3, 120);
proc.setString(4, lastname);
proc.execute();
int age = proc.getInt(1);
//System.out.println("connecting: " + url);
if(connection.equals(null))
//isConnected = false;
Result = 0;
else
//isConnected = true;
Result = 1;
connection.close();
StringBuilder sb = new StringBuilder(1500);
sb.append("n_fields=0");
//out.write("n_fields=1&field_0=123");
out.write(sb.toString().getBytes("UTF8"));
//out.close();
}
catch (Exception ex) {
ex.printStackTrace();
throw new ServletException(ex);
}
//Return result;
}
Может кто-нить найдет ошибку?
