Moloy Biswas wrote:
> Hello All
>
> I am having the error code 400 Bad Request : Http method Get is not
> supported by this url.
>
The immediate cause of your error message is exactly what the message says -- you
have not implemented a doGet() method in this servlet to handle GET requests. You
are only handling POST requests (such as when a form is submitted to the servlet
with a method of "POST").
However, you have substantially more serious problems in the design of this
servlet. You are using instance variables of the servlet class itself (such as
"error", "want_info" and "want_offers") to store things that are specific to a
single request. This is going to fail horribly as soon as two or more requests
occur simultaneously, because there is only one copy of each variable -- the values
set by one request will mess up the processing you are doing for others.
I suggest you review the Servlet Trail in the Java Language Tutorial
(http://java.sun.com/docs/books/tutorial), as well as one of the many books about
servlet programming, to understand this issue in more detail.
Craig McClanahan
___________________________________________________________________________
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