Click to See Complete Forum and Search --> : servlets/calling post method


arnabkundu
August 3rd, 1999, 06:52 AM
Hello
Is there any way by which you can call the Post method of a servlet from
an anchor.By default it always calls the Get method and the code
<a href = "http://32.72.105.2:8080/servlet/servletName" methods = "Post">
tries to call the get method of the servlet

Arnab

alireza
November 2nd, 1999, 05:23 AM
Hi,

I'm not sure that <a href="..."> tag accpets POST or GET methods.The 'methods' attribute of this tag is used for browser-dependent presentation methods not the POST or GET methods. The method="POST" is used in the <FORM> tag. Also HTTP protocol is case-sensitive to its methods name, so you should use POST or GET instead of "Post" or "Get".

Hope to this help.
@lireza


@lireza

Palli
November 5th, 1999, 08:59 AM
Hi
you could always transfer it to the post in your get function

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
doPost(req, res);
}




i hope this will help

regards
Palli