This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
i was just trying out a program in which i created a link as
click here //somelink here is a servlet when the link is clicked i get a error that "The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL)."
i have put the code of the servlet in doPost() method. How can i make the link call the doPost().
i have put the code of the servlet in doPost() method. How can i make the link call the doPost().
Either you move that code to doGet() method by overriding it or override doGet() and call the doPost() within that so your request will be delegated to doPost().
Thanks And Regards
Goutam Chowdhury (Scjp1.4 86%,SCWCD5 94%)
Vickey singh Verma
Greenhorn
Joined: Jul 11, 2008
Posts: 22
posted
0
thank's for replying though i got u'r point but what my intention was to make the link call the doPost() method. I tried this
//<form name="AsIfIcare" method="post">
//<a href="somelink.do">clickhere</a>
//</form>
may be link always calls the doGet() by default.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35247
7
posted
0
may be link always calls the doGet() by default.
Not only "by default" - it will *always* be a GET; there's no way to make it use POST. It's similar to typing in a URL in the browser, or selecting a bookmark - those will always be GETs, too.