Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When do ProcessRequest method called?

I am having a hard time why ,what and how the process request is called? why it is called and how it was called by the servlet container.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
401 views
Welcome To Ask or Share your Answers For Others

1 Answer

The servlet has two important methods for handling the client's request:

1. doPost: in general handles requests coming from forms with post method.

2. doGet: handled requests coming from get method.

Now, ProcessRequest method, is any other method that you can use into your code which is not bound (overridden) to anything.

It is called from the above methods to not complicate the code in them thus the requests are handled in it.

so you can use ProcessRequest to handle your request if and only if it's called from one of the methods above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...