Hi friends, am newbie to servlet. My interviewer asked why
used servlet in your application.
i used servlet for controller logic and business logic .
is it correct ?

Answer Posted / madan

yes, servlets is used for purely for Controller.i think do u know MVC layer( Model View Control),control for Servlet,View for Jsp,Model for business logic..

based on the technology we used, the model will be changed
for example, if u use jsf,ejb
jsf is view and ejb is for model(business)
in struts, jsp is view, beans for model

Different persons are approaching different ways..
but are not used for business logic because we have these many technologies which maintain the B.logic

ok

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the uses of servlet and what is servlet chaining?

833


Why the concept of single thread model interface is used?

759


What is a servlet-to-servlet communcation?

900


What must be implemented by all servlets?

824


What is the GenericServlet class?

907


Difference between java beans & servlets?

806


Why do we need a constructor in a servlet if we use the init method?

767


How to handle exceptions thrown by application with another servlet?

842


What’s the difference between sendredirect and forward methods

854


How to get the current httpsession object?

900


Explain the architechure of a servlet?

870


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

820


What do you mean by cgi and what are its drawbacks?

755


What is the difference between the http servlet and generic servlet?

905


What are the benefits of using servlet over cgi?

809