• Post Reply Bookmark Topic Watch Topic
  • New Topic

Model2 Arch.

 
Titu singh
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In M2 Arch. controller servlet do processing job and takes all the decision,
why can't we use jsp for this job (controller).
pls. write url related to this topic or/and pls. write the ans.
thanks.
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It ocurred to me 2 times while testing yet, that the JSP wasn't executed. The sourcecode was send and diplayed in the browser instead.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From design perspective a JSP should only be used for 'view' part. For this it was created. The main advantage of a JSP is that you directly can use HTML Code and don't have to use the out.println("HTML");
But logic should always be placed in serlvet code. Cause it is a lot more readable (IMHO)
and offers also some more options in deployment, e.g.
you can map a servlet to an URL pattern like .../do/* what you would never be able to do with a JSP. Then you can configure initial parameters in the deployment descriptor.
etc.
Olli
 
Titu singh
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur response.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also see this link for a full dicussion on model 2.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!