• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet  RSS feed

 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
Is a Basic question but felt important one.Can any body tell me why servlet is used as a controller?Is there any other way we can accomplish the same job which is done by the servlet?
Thanks in advance
Prashu
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prashu,
A servlet is the first piece of code that the server runs after getting a request from the browser. As such, it is best positioned to delegate to the proper class to do the real work.

Many frameworks use a configuration file to store the mappings. The servlet is still doing the work, but you don't have to write it. An alternative is to have a different servlet for each type of request. However, this becomes more work to maintain.
 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne Boyarsky,yes i understood why servlet as a controller

Thanks
Prashu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!