Revert "Made getServlet and getPortlet public (#10882)"
(accidentally merged from 7.1)

This reverts commit 179e672b5d3ce8c4c972dcfacbdbd39c5a08d6fa.

Change-Id: Ice2bdd949bd12000882c406af6ea6c0c6bcc145a