Get the Verb of request in jsp  
Author Message
jwren





PostPosted: 2007-10-4 4:19:00 Top

java-programmer, Get the Verb of request in jsp 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

 
Manish Pandit





PostPosted: 2007-10-4 4:21:00 Top

java-programmer >> Get the Verb of request in jsp On Oct 3, 1:19 pm, jwren <email***@***.com> 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

 
Lew





PostPosted: 2007-10-4 5:04:00 Top

java-programmer >> Get the Verb of request in jsp Manish Pandit wrote:
> On Oct 3, 1:19 pm, jwren <email***@***.com> 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