I think I got a similar error, just make sure you implement both the doPost
and doGet methods. When I removed my doPost method my servlet gave the same
error, when I put it back it worked again.
Marius
////////////////////////////////////////////////////////////////////////////
/////////////////
// doPost
//
////////////////////////////////////////////////////////////////////////////
/////////////////
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
// Value chosen to limit denial of service
if (req.getContentLength() > 8*1024) {
res.setContentType("text/html");
ServletOutputStream out = res.getOutputStream();
out.println("<html><head><title>Too big</title></head>");
out.println("<body><h1>Error - content length >8k not ");
out.println("</h1></body></html>"); }
else
doGet(req, res);
}
////////////////////////////////////////////////////////////////////////////
/////////////////
// doGet
//
////////////////////////////////////////////////////////////////////////////
/////////////////
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
}
>
>
> Is there a doGet method since it's a GET?
>
> Oguz Baktir wrote:
>
> > Hi again!
> > I set this servlet on my Java Server, and whan I call it from the URL,
> > I get the message:
> >
> > 400 Bad Request
> > GET is not supported by this URL
> >
> > What may be the reason?
> >
> > Info: The .html file that I call the servlet uses POST as the
> action method
> > and there is a doPost() method in the servlet code.
> >
> > thanks
> > Oguz
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html