Trending Applets Discussions

Follow

Ask the Community


Ask any professional question and get answers from other specialists.

Stream language
Firoz Ahmad's image
Question added by Firoz Ahmad Software Engineer Tata Consultancy Service Limited
6 years ago
Answers:
8
Followers:
Views:
30
Vote Count:
0
Answer should contain a minimum of 25 characters.
Zaid Rabab'a's image
Question added by Zaid Rabab'a Software Development Team Leader Al-Safa Co. Ltd.
10 years ago
Answers:
1
Followers:
Views:
131
Vote Count:
3
Answer should contain a minimum of 25 characters.
hardik sangani's image  
Answer added by  hardik sangani, Information Technology Analyst, Infosys Ltd
6 years ago

no , we cannot provide a parameterized constructor in servlet.As , in servlet consist of the container creates the object for servlet.

Hasan Mobarak's image  
Answer added by  Hasan Mobarak, Software Engineer (Java), Fakir Knitwear's ltd
6 years ago

No.Servlet instances created by Servlet container, it Create no argument constractor. 

Gulshan Kumar's image  
Answer added by  Gulshan Kumar, Senior Software Developer, Cognizant - India
6 years ago

No, in servlet every instance is created by the given container via reflection api.

DWARKILAL PATIDAR's image  
Answer added by  DWARKILAL PATIDAR
6 years ago

No, Servlet instances are created by the container, and they expect to find a public, no-arg constructor (the default constructor).

sundar yannabathula ys's image  
Answer added by  sundar yannabathula ys, Software Engineer, Infosys Technologies Limited
6 years ago

no! we cannot provide a parameterized constructor in servlet.The servlet container creates the object for sevrlet.The container will create the object based on Class.forN ... See More

Vishal Patel's image  
Answer added by  Vishal Patel, Java developer, Open Dox Technology Indore
6 years ago

yes we keep parameterised constructor in our servlet class.

sriramjee Alluri's image  
Answer added by  sriramjee Alluri, Software Engineer, BMW AG
6 years ago

No we can't use paramererized constructor

Rizwan Ali Sardar Ali's image  
Answer added by  Rizwan Ali Sardar Ali
6 years ago

  7down voteaccepted No. Servlet instances are created by the container via reflection, and they expect to find a public, no-arg constructor (the default constructor) ... See More