D
Doug Schaible
I have been trying to get a JSP to "talk" with a class that I wrote.
I wrote a class called Wlm to call a stored procedure in a database.
I then added Wlm(parms...) to my JSP and I get an error:
/tmp/jsp_servlet/_wlm/__call_sp_start_stop.java:349: cannot resolve
symbol
symbol : method Wlm
(java.lang.String,java.sql.Connection,java.lang.String,java.lang.String)
location: class jsp_servlet._wlm.__call_sp_start_stop
Wlm(databaseURL, db2, command, results);
This is all the code in my JSP that call Wlm:
Wlm(databaseURL, db2, command, results);
This is the Wlm class which compiles fine:
import java.sql.* ;
import java.util.* ;
import com.ibm.* ;
public class Wlm{
public Wlm( String databaseURL, java.sql.Connection db2, String
command, String results)
{
try{
java.sql.Statement st2;
java.sql.ResultSet rs2;
int one2 = 1;
try{
Class.forName("com.ibm.db2.jcc.DB2Driver");
}
catch( ClassNotFoundException e ){
//
}
db2.close();
java.util.Properties properties = new java.util.Properties ();
properties.setProperty ("user", "xxxx");
properties.setProperty ("password", "xxxx");
db2 = java.sql.DriverManager.getConnection (databaseURL,
properties);
//((com.ibm.db2.jcc.DB2Connection)db2).setDB2ClientApplicationInformation("WLM_QUERY_WEB");
// set the path to our schema name so we can find our procedure
st2 = db2.createStatement();
st2.execute("SET CURRENT FUNCTION PATH DB2SYS");
CallableStatement stmtSP = db2.prepareCall("CALL
DB2SYS.DB2_COMMAND(?)");
stmtSP.setString(1, command.toUpperCase());
stmtSP.execute();
results = "";
rs2 = stmtSP.getResultSet();
while (rs2.next())
{
results = results + "<br>" + rs2.getString(one2);
}
}
catch (SQLException e)
{
//out.println("error");
}
}
}
Thanks in advance for any help,
Doug
I wrote a class called Wlm to call a stored procedure in a database.
I then added Wlm(parms...) to my JSP and I get an error:
/tmp/jsp_servlet/_wlm/__call_sp_start_stop.java:349: cannot resolve
symbol
symbol : method Wlm
(java.lang.String,java.sql.Connection,java.lang.String,java.lang.String)
location: class jsp_servlet._wlm.__call_sp_start_stop
Wlm(databaseURL, db2, command, results);
This is all the code in my JSP that call Wlm:
Wlm(databaseURL, db2, command, results);
This is the Wlm class which compiles fine:
import java.sql.* ;
import java.util.* ;
import com.ibm.* ;
public class Wlm{
public Wlm( String databaseURL, java.sql.Connection db2, String
command, String results)
{
try{
java.sql.Statement st2;
java.sql.ResultSet rs2;
int one2 = 1;
try{
Class.forName("com.ibm.db2.jcc.DB2Driver");
}
catch( ClassNotFoundException e ){
//
}
db2.close();
java.util.Properties properties = new java.util.Properties ();
properties.setProperty ("user", "xxxx");
properties.setProperty ("password", "xxxx");
db2 = java.sql.DriverManager.getConnection (databaseURL,
properties);
//((com.ibm.db2.jcc.DB2Connection)db2).setDB2ClientApplicationInformation("WLM_QUERY_WEB");
// set the path to our schema name so we can find our procedure
st2 = db2.createStatement();
st2.execute("SET CURRENT FUNCTION PATH DB2SYS");
CallableStatement stmtSP = db2.prepareCall("CALL
DB2SYS.DB2_COMMAND(?)");
stmtSP.setString(1, command.toUpperCase());
stmtSP.execute();
results = "";
rs2 = stmtSP.getResultSet();
while (rs2.next())
{
results = results + "<br>" + rs2.getString(one2);
}
}
catch (SQLException e)
{
//out.println("error");
}
}
}
Thanks in advance for any help,
Doug