A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
Why we can't decare doPost() as default access specifier?
Soumya Ranjan Mohanty
Ranch Hand
Joined: Mar 07, 2010
Posts: 44
posted
Mar 18, 2010 00:43:28
0
Why We declare the
servlet
class as Public and
dopost()
as public or protected??
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
I like...
posted
Mar 18, 2010 02:27:06
0
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServlet.html
You cant reduce the visibility of doPost in Subclass .it is one of the Override rule.
also public servlet class is visible to other packages also.
I agree. Here's the link:
http://aspose.com/file-tools
subject: Why we can't decare doPost() as default access specifier?
Similar Threads
doGet(), doPost() implementation
[IMP]Whydoes it give 403 Method not found exception..??
dopost() and doget() methods
Why Not Overload Service Method.
doGet and doPost
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter