File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: about protected void doGet() ?
It's not a secret anymore!