Get the Verb of request in jsp

Discussion in 'Java' started by jwren, Oct 3, 2007.

  1. jwren

    jwren Guest

    Hi Guys,

    Would anyone mind telling me how to get the verb of a request in jsp?
    I would like to know whether the user is using a POST or GET request.

    Thanks,
    James
     
    jwren, Oct 3, 2007
    #1
    1. Advertisements

  2. On Oct 3, 1:19 pm, jwren <> wrote:
    > Hi Guys,
    >
    > Would anyone mind telling me how to get the verb of a request in jsp?
    > I would like to know whether the user is using a POST or GET request.
    >
    > Thanks,
    > James


    request.getMethod( );

    -cheers,
    Manish
     
    Manish Pandit, Oct 3, 2007
    #2
    1. Advertisements

  3. jwren

    Lew Guest

    Manish Pandit wrote:
    > On Oct 3, 1:19 pm, jwren <> wrote:
    >> Hi Guys,
    >>
    >> Would anyone mind telling me how to get the verb of a request in jsp?
    >> I would like to know whether the user is using a POST or GET request.
    >>
    >> Thanks,
    >> James

    >
    > request.getMethod( );


    Alternatively, set a flag in the HttpServlet's doGet() and doPost(),
    respectively, before invoking the common logic.

    --
    Lew
     
    Lew, Oct 3, 2007
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,617
    John Saunders
    Oct 16, 2003
  2. Kenneth Myhra

    HTTP error 405 for 'PUT' verb

    Kenneth Myhra, Feb 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,267
    bruce barker
    Feb 17, 2004
  3. =?Utf-8?B?UmV6YSBTb2xvdWtp?=

    The web serve has been locked down and is blocking the Debug verb.

    =?Utf-8?B?UmV6YSBTb2xvdWtp?=, Nov 24, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,816
    Ben Strackany
    Nov 24, 2004
  4. Randy
    Replies:
    0
    Views:
    577
    Randy
    Mar 29, 2006
  5. Kai Grossjohann
    Replies:
    2
    Views:
    922
    Anton Spaans
    Dec 8, 2003
  6. Replies:
    0
    Views:
    4,988
  7. jb
    Replies:
    2
    Views:
    799
  8. Request Verb question

    , Jun 19, 2007, in forum: Javascript
    Replies:
    4
    Views:
    169
    Darko
    Jun 19, 2007
Loading...