>Number: 5342
>Category: mod_jserv
>Synopsis: getParameter throws NullPointerException where there are no
>params
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sat Nov 20 01:30:01 PST 1999
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: Apache/1.3.9 (Unix) (Red Hat/Linux) ApacheJServ/1.1b3
>Environment:
RedHat Linux 6.1, IBM JDK 1.1.8
>Description:
[20/11/1999 12:22:11:489 GMT+03:00] errorTest: init
[20/11/1999 12:22:11:565 GMT+03:00] java.lang.NullPointerException
at org.apache.jserv.JServConnection.parseParams(Compiled Code)
at org.apache.jserv.JServConnection.getParameter(Compiled Code)
at errorTest.doGet(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jserv.JServConnection.processRequest(Compiled Code)
at org.apache.jserv.JServConnection.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
I just run my servlet without any params (by lynx
http://127.0.0.1/servlets/errorTest) and
got 500 Internal Server Error.
>How-To-Repeat:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class errorTest extends HttpServlet
{
final public void doGet (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
{
request.getParameter("debug");
}
}
>Fix:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]