GeekInterview.com
Answered Questions

Why servlet used as controller in mvc2?Plz explain details

Asked By: Prabhakaran | Asked On: Jan 9th, 2007

Answered by: prateeks88 on: Nov 4th, 2008

According to MVC2 the purpose of addition of the controller was to just separate the dynamic part of the application from the static part and for that the dynamic part given the name "view" is handle...

Answered by: sampra on: Mar 4th, 2008

controlar is the servert,which task is to contol the prorm

In mvc1 architecture there is no controller concept then why it is called as mvc architecture?

Asked By: sarithareddy | Asked On: Dec 26th, 2006

Answered by: Aarasu on: Aug 5th, 2009

There is a controller in MVC1 architecture.
Controller in MVC1 architecture is implemented in jsp along with view of the page.
But the problem is there is no seperate controller in MVC1.
So burden of having both Controller and view in jsp is more.
JSP will implement both Controller and View components.

Answered by: atulkumar81 on: Apr 23rd, 2007

There is MVC means Model, View & Controller, There is no MVC1 & MVC2, There is Model1 & Model2 Architecture

What happens when we call destroy() method in init() method in servlets

Asked By: sarithareddy | Asked On: Dec 26th, 2006

Answered by: ravi_1229 on: Feb 16th, 2010

We can call a destroy() method from init() or service() normally like any other methods. Container will executes the destroy() method but does not unloads the servlet object from the memory. The unloading of servlet can be taken care by container only.

Answered by: pankaj4mhp on: Jan 20th, 2010

The destroy method can be called inside the init method. It will execute the code written in the destroy method, and flow will be back to the init method and continues.Now the question arises.... &nbs...

Why genericservlet is an abstract class ?

Asked By: Saurabh | Asked On: Dec 12th, 2006

Answered by: Avijit Chowdhury on: Nov 10th, 2011

when you are overriding any abstract class, you have to override all the methods of that class.

Answered by: dhruv_saksena on: Mar 14th, 2008

GenericServlet is an abstract class because its upto the user how he wants it to use the life-cycle methods of the servlet and also the server needs to make sure that all the life cycle methods of the...

What is dynamic content?In real time example?

Asked By: radhika | Asked On: Dec 6th, 2006

Answered by: dhruv_saksena on: Mar 14th, 2008

See by dynamic content we mean the content which is decided at runtime.Depending on the request which a user is sending we get a respose which is dependent on the request and it is not fixed.For examp...

Answered by: sunil.yadav on: Jan 31st, 2007

very simple if you ask me my profile or someone else ask my profile, i will answer in two seperate reply considering the consiquency, as per request reponse content is different, and thats the dynamic...

Can we put costructor in place of init() method . If yes how it works plz xplain in detail??

Asked By: ashish | Asked On: Nov 10th, 2006

Answered by: praveen.sakhamudi on: Feb 12th, 2007

webcontainer create an object for servlet class.for createing an object use the newInstance() method.this object automaticaly create a defaultconstructor so we can not create parametarised constructior for this object.praveen kumar sakhamudi

Answered by: sunil.yadav on: Jan 31st, 2007

constructor makes a simple object, when the container call init() on this simple object, now the simple object has become servlet which can serve the request.

What is the difference between doget() and dopost() methods of a httpservlet and when to use each one?

Asked By: rs | Asked On: Nov 6th, 2006

Answered by: shivaniyadav on: Jul 28th, 2012

they both r service methods.....

do get() has a disadvantage of sending very less amt of
information as it can send 24 to 255 character........

do post() is used for posting d information.....

Answered by: rpd on: Jul 19th, 2012

in doPost() data of the client is send as apart of request body and in doGet() data of the client is send as a part of url

What is the difference between request.Forward and requestdispatcher.Forward?

Asked By: Navya | Asked On: Sep 22nd, 2006

Answered by: muktasharad on: Sep 3rd, 2008

The question should be like - What is the difference between requestdispatcher.forward and response.sendredirect? The response will not be sent back to the client and so the client will not know...

Answered by: sunil.yadav on: Jan 31st, 2007

The question should be -- What is the difference between response.sendRedirect(url) and RequestDispatcher.forward(url)?

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: