www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Lloyd <mll...@fore.com>
Subject mod_jserv/5396: Intermitent "Bad Request" when servlet is run
Date Tue, 30 Nov 1999 22:31:21 GMT

>Number:         5396
>Category:       mod_jserv
>Synopsis:       Intermitent "Bad Request" when servlet is run
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Nov 30 14:40:04 PST 1999
>Last-Modified:
>Originator:     mlloyd@fore.com
>Organization:
apache
>Release:        Apache/1.3.9 + ApacheJServ/1.1b3
>Environment:
UNIX, Solaris
>Description:
ERROR MESSAGE -- [30/11/1999 16:33:05:282] (ERROR) ajp12: Servlet Error: GET is not supported
by this URL

SYNOPSIS: After restarting the apache web server and jserv, the servlet below (ExtendedServlet)
intermitently fails with above error message. Once it has failed once (see above error message)
it continues to fail until another servlet is loaded. After that, ExtendedServlet executes
normally.

CODE:
-----------------------------------------------------------------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class TestServlet extends BaseServlet {

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException {

        response.setContentType("text/html");
        ServletOutputStream out = response.getOutputStream();        
        out.println("POST REQUEST");
        out.close();

    }

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws IOException, ServletException {
            
        response.setContentType("text/html");
        ServletOutputStream out = response.getOutputStream();        
        out.println("GET REQUEST");
        out.close();        
            
  }
}

-----------------------------------------------------------------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public abstract class BaseServlet extends HttpServlet {

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    //Abstract classes to be implemented
    public abstract void doGet(HttpServletRequest request,
        HttpServletResponse response) throws IOException, ServletException;
        
    public abstract void doPost(HttpServletRequest request,
            HttpServletResponse response)throws IOException, ServletException;

}
>How-To-Repeat:
I have been able to repeat this problem by:
1. restarting the web server (& jserv)
2. making repeated requests to ExtendedServlet
>Fix:
Not at present.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> 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!     ]




Mime
View raw message