Bookmark Topic Watch Topic
  • New Topic

MVC architecture

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Report post to moderator
My question is what benifits Servlet provides as a controller instread of
JSP, I mean why don't we use JSP as a controller.JSP is also converted into
Servlet in translation phase so it is as good as Servlet hen why don't we
use JSP as a controller what qualities of the Servlet forces us to prefer it
instread of jsp
 
satishkumar janakiraman
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi

For your question read jsp architecture models. Two types are available
Model 1
Model 2

Model 1 uses jsp as controller but mainly for simple applications not for complex one
Model 2 uses servlet as controller and used for complex applications.

In model 1, Jsp page is responsible for handling request and sending response back to the client. all database access is performed by beans.

In model 2, Servlet is a controller and is responsible for handling request. bean is used as a model and jsp is used as a view.

for more details read jsp model architectures.

bye for now
sat
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
sitaram, please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please continue any discussion of this topic here.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!