Im attempting my first
servlet, and Im using the combination
Applet --> Servlet -->
JDBC --> SQL.
Im using
Tomcat 4.0.1 as my server and I have placed all files in the ROOT directory. Im getting the following error in my servlet class
java.lang.NoSuchMethodError
at t.Serve.performTask(Serve.java:75)
at t.Serve.doPost(Serve.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
I have traced the error to the code in bold i.e when Im attempting to connect to SQL
public void performTask(javax.servlet.http
{
try
{
ObjectInputStream in = newObjectInputStream (request.getInputStream());
String s = (String)in.readObject();
info.addPerInfo(s); }
public void init()
{
info = new InfoGetter();
}
public InfoGetter()
{
String dsn = "jdbc:twtds:sqlserver://CAT/DOG";
try
{
Class.forName("com.thinweb.tds.Driver");
myCon = DriverManager.getConnection(dsn, ..
}
public void addPersInfo(String first)
{
try
{
PreparedStatement statement = myCon.prepareStatement(....
statement.setString(1,first);
statement.executeUpdate();
}