This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes about protected void doGet() ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "about protected void doGet() ?" Watch "about protected void doGet() ?" New topic

about protected void doGet() ?

hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

i have created an HttpServlet which overrides

protected void doGet()

since this method is protected how to container calls this method?

Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
The container never calls the doXXX methods. Instead the container always calls the public void service(ServletRequest req, ServletResponse res) method in HttpServlet class. This service method inturn calls the protected void service(HttpServletRequest req, HttpServletResponse resp) method.

This protected service method, then delegate the calls to doXXX methods as required.

Quaerendo Invenietis
It is sorta covered in the JavaRanch Style Guide.
subject: about protected void doGet() ?
Similar Threads
protected vs public void doGet
Signature of all the doXxx() methods
HTTP Status 405 - HTTP method GET is not supported by this URL
get parameters from select
Compilation Error