Hi, i have the next bean code:
package BBSpack;
import java.util.*;
import java.sql.*;
public class BBS {
public
String categoria = "";
public int prueba = 0;
public BBS() {
initComponents();
}
private void initComponents() {
//String categoria = "";
//int prueba = 0;
try {
String userName = "root";
String password = "";
String url = "jdbc:mysql:3306/localhost/bbs";
Class.forName("org.gjt.mm.mysql.Driver").newInstance ();
//Connection conn = DriverManager.getConnection (url, userName, password);
prueba = 1;
} catch (Exception e) {
prueba = -1;
}
}
}
this don't work in
JSP, always is -1, when i execute the bean in a JSP, what ca i do for solve this?, thanks a lot!!!