CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    4

    servlets/calling post method

    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


  2. #2
    Join Date
    Jun 1999
    Location
    Tehran, Iran
    Posts
    5

    Re: servlets/calling post method

    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

  3. #3
    Join Date
    Oct 1999
    Location
    Iceland
    Posts
    16

    Re: servlets/calling post method

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured