I take it you know the servlet that is causing the error...  I would code the method 
like this:

public void service(HttpServletRequest request, HttpServletResponse response)
  throws ServletException, IOException {
  
  response.setContentType("text/html");
  PrintWriter out = response.getWriter();
  out.println("<HTML><HEAD><TITLE>Test Page</TITLE></HEAD><BODY>");
  
  try {
    ... code here ...
  } catch (Exception e) {
    out.println("\n<BR><PLAINTEXT>");
    e.printStackTrace(out);
    out.printn("</PLAINTEXT>");
  }
  
  out.println("</BODY></HTML>");
}

Then you should get an HTML page returned to the browser with a description of the 
error and the line number that it occurred on.

Jason Goemaat
http://www.goemaat.com

-----Original Message-----
From:   Stotler, John M. [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, July 21, 1999 11:02 AM
To:     '[EMAIL PROTECTED]'
Subject:        debugging information

System is Intel Solaris, JServ 1.0, Apache 1.3.6

I've configured, compiled and built with debugging enabled. I've added the
parameter to turn off the JIT. Still, all I get from my servlet as an error
code is NullPointerException - there is no clue given as to why, how, where,
etc.

I'm running this same servlet with the same configuration on an NT box
sitting right next to the Solaris box, and any errors in the jserv.log give
me some useful information. For some reason on Solaris, I can't get any
specifics on the exception error.

Am I missing something somewhere? I configured with --enable-debugging, and
I've got 

wrapper.bin.parameters=-Djava.compiler=NONE

It seems I should be getting some decent debugging info, or at least more of
a stack trace. I'm going nuts here trying to figure out why the servlet
won't serve. 

Thanks,
John Stotler


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to