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. Advertising

  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. Advertising

  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. Advertising

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. Kenneth Myhra

    HTTP error 405 for 'PUT' verb

    Kenneth Myhra, Feb 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,075
    bruce barker
    Feb 17, 2004
  2. =?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,611
    Ben Strackany
    Nov 24, 2004
  3. Randy
    Replies:
    0
    Views:
    432
    Randy
    Mar 29, 2006
  4. jb
    Replies:
    2
    Views:
    728
  5. Request Verb question

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

Share This Page