directly invoke doPost or doGet method istead redirecting from service

Hi ,Is there any possibility to invoke doGet or doPost methods instead of redirecting from the service method?Thanks in Advance
[148 byte] By [javaminea] at [2007-11-27 5:14:41]
# 1

at one point in the code you need to check what type of request it actually is before you can call any of the doXXX() methods. So no.

BUT

you can skip implementing the doGet() and doPost() and handle your request directly in the service() method by overriding it.

I don't see the benefit however. You will only deviate from a standard and good developers don't do that when it is not necessary.

gimbal2a at 2007-7-12 10:36:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi ,

i am sorry i didn't get you. before invoking the service method or doXXX methods container will check for the protocol type not by the developer as i know (not for sure). when client made request for subclass of HttpServlet then first servive method vl invoke the request from there it forwards the request to doXXX methods as per the request given by the client. developer won't check every time that the request type is of http or ftp or some other as i know(not sure).

Please tell me , we can also check the request type in our program before servlet invokes request.

Thanks in Advance

javaminea at 2007-7-12 10:36:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...