Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP becomes a servlet - implications

 
Rahul Sudip Bose
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If JSP becomes a servlet finally, then why do we use servlets ? If servlets are still needed, then when should one use them (and when not) ?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSPs are intended to create views. Using them for anything else is a misuse of the tool.



The fact that JSPs are backed by servlets is an implementation detail that has no implications.
 
Rohit Mehta
Ranch Hand
Posts: 79
Chrome Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can try ..

Servlet is a versatile api, which is much more than putting Java into HTML - it has more aspects than view/presentation technology.
Talking about view/presentation aspect - JSP is better (& easy) than Servlet.

Its other aspects are much popular - that's why we have a DispatcherServlet as a core component in a advanced framework like Spring.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic