Hi !!
I think your problem is something else.
Let me explain something:
There are two (most common) ways to invoke a servlet.
The first one is : http://www.somewhere.com/servlet/YourServlet
or
http://www.somewhere.com/servlet/YourServlet?param1=1¶m2=yes
This will invoke the servlet's doGet method .
The second one by having in a HTML form:
<form method="post"
action="http://www.somewhere.com/servlet/YourServlet">
<input type....>
</form>
this will invoke the servlet's doPost method
special case (rarely used) :
<form method="get".....>
....
this will invoke also the servlet's doGet method
So if U write in a browser ( i think this is your case)
http://www.somewhere.com/servlet/YourServlet
this will ALWAYS look for the doGet method and since U don't have it you get
the error message.
So if U want that your servet's doPost mehod to be invoked you need a HTML
PAGE with a FORM in it.
Hope it helps.
Best wishes,
Andras
-----Original Message-----
From: Duke Martin <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, May 22, 1999 5:40 AM
Subject: Re: post or get?
>My servlet code contains:
>
>public void doPost
>.
>.
><form method=post>
>.
>.
></form>
>
>and I still receive a method "get not supported" error. Help?
>
>-----Original Message-----
>From: Rosdi Sedi <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Friday, May 21, 1999 9:13 PM
>Subject: Re: post or get?
>
>
>>Hi Duke,
>>
>>In your HTML form, change this..
>>
>><form method='get'>
>>
>>to this..
>>
>><form method='post'>
>>
>>
>>sedi.
>>
>>----- Original Message -----
>>From: Duke Martin <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Saturday, May 22, 1999 9:27 AM
>>Subject: post or get?
>>
>>
>>> Hello,
>>>
>>> I have a servlet that generates forms. When I use public void doGet the
>>> servlet runs great except that everytime the screen is refreshed the
>>> parameters at the end of the url are re-submitted. If I use public void
>>> doPost I receive an error that says "get not supported by this url".
>What
>>> is this? Could someone show me some example code on the proper way to
>>> generate an HTML form using the doPost method?
>>>
>>> Duke
>>>
>>>
>>__________________________________________________________________________
_
>>> 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
>>
>>__________________________________________________________________________
_
>>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
>
>___________________________________________________________________________
>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
___________________________________________________________________________
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