Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we write a constructor for a Servlet class ? if yes how ?
if no why not ?

Answer Posted / saikiran

that is one of the specification rule that
1.instantiated by constructior with no argument.
2.implementd class should be public and non-abstract.
3.should be implemnt javax.servlet.Servlet
We can Write it

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if you need to span your transaction across multiple servlet invocations?

1082


What is servlet container. how it works?

1134


Explain request dispatcher and its methods.

985


Tell us something about servletconfig interface.

989


Can you send an authentication error from a servlet?

965


What are some disadvantages of storing session state in cookies?

1015


Why do we need servlet filter?

1051


How can you push data from an Applet to a Servlet?

1089


What exactly is a servlet?

1001


Is that servlet is pure java object or not?

1105


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

1089


What is string tokenizer?

1072


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

1092


Who is responsible for writing a constructor?

1256


What are the difference between session and cookies in servlet? Explain

1038