jswdk-1.0.1 under Window problem

larva

Member
Jul 15, 2001
185
0
0
Hi,

I have installed jswdk-1.0.1 under Window and I put my java class files under d:\jswdk-1.0.1\webpages\WEB-INF\servlets. Whenever I recompile my java code, I need to restart the jswdk thenit will take effect. If I don't restart it, no matter how many times I refresh my browser(IE6), I won't work. I can I make it to take effect without restarting jswdk ? Thanks !

regards,
Larva
 

michaelh20

Senior member
Sep 4, 2000
482
0
0
I am not sure of the particulars of the software you're using, but Servlets only "refresh" every so often (like a minute or two or something on that order, not sure if you can reconfigure it) and they do *not* just refresh because you recompiled the code. So either you wait a while, or restart it I guess. Perhaps you can reconfigure it?
 

manly

Lifer
Jan 25, 2000
13,341
4,102
136
That's an ancient servlet container; it won't do hot reloading of classes. Apache/Jakarta Tomcat 4 might. All containers will refresh JSP pages without restarting the server. Some will handle servlet (and other) classes as well.

Personally, I'd recommend evaluating Caucho Resin.
 

larva

Member
Jul 15, 2001
185
0
0
Hi,

My code are below:

================================================================================
public void init() throws ServletException
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc:eek:dbc:tweb";
dbCon = DriverManager.getConnection(url,"larva","larva");
}
catch(ClassNotFoundException e)
{
System.out.println("DB Driver not found");
System.out.println(e.toString());
throw new UnavailableException(this,"Database driver class not found");
}
catch(SQLException e)
{
System.out.println("Error connecting to DB");
System.out.println(e.toString());
throw new UnavailableException(this,"Can't connect to DB");
}
}

public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
ResultSet rs;
Statement stmt;
StringBuffer qry = new StringBuffer(1024);
int numCriteria = 0;
String r1;

res.setContentType("text/html");
PrintWriter out = res.getWriter();

String user = req.getParameter("txt_username");

qry.append("SELECT * FROM USERS WHERE NAME = '");
qry.append(user);
qry.append("'");

try
{
stmt = dbCon.createStatement();
rs = stmt.executeQuery(qry.toString());
r1 = rs.getString("LOGON_PASSWORD");
}
catch(SQLException e)
{
res.sendError(res.SC_ACCEPTED, qry.toString());
return;
}
================================================================================

I m connecting to my local Oracle8i DB. I got I following error message:

message : SELECT * FROM USERS WHERE NAME = 'larva'

description :This request was accepted for processing, but has not been completed (SELECT * FROM USERS WHERE NAME = 'larva').

There isn't any for connecting to DB but when executing a query, I receive this stupid message. Please help, Thanks !

regards,
Larva