I am running Tomcat 3.2.1 with Apache 1.3.14. My default container is AJP12(mainly because I haven't tried the AJP13 yet [yeah, i know its in the docs, just haven't had time to read them to update it to use 13). If I run the HTML form against this servlet I get this error. I know usually a java.lang.NullPointerException means something is null where it should't be (like no params are passsed to the servlet). But the URL it passes (see below) shows it is passing them. Any ideas? If you don't think it's tomcat-related, post stating so to prevent other responses from inappropriately spamming the list and/or e-mail me back privately if it's not on topic. Thanks! TOMCAT ERROR CODE: Error: 500 Location: /java/servlet/JimServlet Internal Servlet Error: java.lang.NullPointerException at java.lang.ClassLoader.resolveClass0(Native Method) at java.lang.ClassLoader.resolveClass(ClassLoader.java:598) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java) at org.apache.tomcat.core.Handler.service(Handler.java) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java) at org.apache.tomcat.core.ContextManager.service(ContextManager.java) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java) at java.lang.Thread.run(Thread.java:498) URL PASSED FROM HTML CODE: http://www.this1zmine.com/java/servlet/JimServlet?LINE1=TESTING HTML FORM SOURCE CODE: <HTML> <HEAD></head> <BODY> <CENTER> <FORM METHOD="GET" NAME="TESTER" ACTION="http://www.this1zmine.com/java/servlet/JimServlet"> <B>Input1: <INPUT TYPE="TEXT" LENGTH=30 NAME="LINE1"></INPUT> <INPUT type=submit value="SUBMIT"></INPUT> </FORM> </BODY> </HTML> SERVLET SOURCE CODE: import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; class JimServlet extends javax.servlet.http.HttpServlet { public void doGet( javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException { performTask(request, response); } public void doPost( javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException { performTask(request, response); } public void init() { } public void performTask( javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) { try { response.setContentType("text/plain"); ServletOutputStream out = response.getOutputStream(); Enumeration eParmNames = request.getParameterNames(); while (eParmNames.hasMoreElements()) { String name = (String) eParmNames.nextElement(); String value = request.getParameter(name); out.println(name + " = " + value); } } catch (Throwable theException) { theException.printStackTrace(); } } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jim Swart Agere Systems - Colorado Design Center Unix/NT/Solaris Systems Administrator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do I need to use the AJP13 container for this?
Swart, James (Jim) ** CTR ** Thu, 21 Jun 2001 09:21:31 -0700