Yes, you start JavaWebServer manually using either the jserv command or the httpd/httpd_nojre commands (just like it says in the documentation =8^)  If you need to put a .class file in JWS' classpath, create a <server_root>/classes directory and put them there.  If you need to put a .jar file in JWS' classpath, put them in <server_root>/lib and they will get automatically loaded.  Since .jar files are basically just .zip files with an optional manifest, it works fine to rename classes111.zip to classes111.jar and copy it to <server_root>/lib.  Then you can go back to the NT Service, and not have to manually restart the server.
    (*Chris*)
 
P.S.  Usually product specific questions like this are better asked on the product specific mailing list like JServ-Interest.  Check out http://www.sun.com/software/jwebserver/faq/index.html
 
----- Original Message -----
Sent: Wednesday, August 11, 1999 8:31 AM
Subject: Query = java.lang.NullPointerException, httpd

Hello, and thank you for taking the time to read over my post.
 
Windows NT Workstation 4.0(sp3)
JavaWebserver1.1.3
 
I recently came across some information that suggests if my JWS is loaded on startup, it will assume a CLASSPATH (wrapper.classpath), in turn ignoring the system classpath. I changed the startup of JWS to manual, and rebooted. Typed http from a command prompt. Executed my servlet (http://"nameofmymachine":8080/servlet/"nameofservlet"), it was finally able to load the JDBC driver. (It was now able to locate the classes111.zip in the classpath). Strangely enough, i seem to have trouble repeating the process. Am i going about it the wrong way? Should step #1 be "httpd"? Would you recommend the "-jre" option..? What might be the difference, benefits, etc?  Should i modify one of the ".properties" fiels? 
 
Now my servlet refuses to execute a query statement. Please allow me to explain..
 
Previously, i had been able to run my servlet, which in turn would execute a query on a remote machnie via a JDBC Thin driver connection. It worked. I just didn;t  know how to present a result set using "out.println". Sadly enough, when i attempt to run that same servlet, i receive a "java.lang.NullPointerException" on the command prompt where the server is running(where i executed the httpd command). This forces a shutdown of the Webserver. In case you are wondering, the query is a rather simple one. Actually, i've tried two separate ones, same result.
 
try {
  
 rs = stmt.executeQuery("select 'Hello World' from dual");
 
// rs = stmt.executeQuery("SELECT empno, into :empno1 FROM emp FROM emp WHERE empno > '7930'");
 

       } catch (SQLException e) {
          System.err.println("Something wrong with the select statement");
          System.err.println(e);
          System.exit(1);
    
       } catch (Exception e) {
          System.err.println("Other Excpetion");
          System.err.println(e);
          System.exit(1);
       } 
 
 
Any ideas? My thanks in advance,
 
 
Robert Pimentel
P.S. I am able to run other servlets, applets, etc through JWS without , but not the servlet involving a JDBC query.
 

Reply via email to