File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes JSP becomes a servlet - implications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP becomes a servlet - implications " Watch "JSP becomes a servlet - implications " New topic

JSP becomes a servlet - implications

Rahul Sudip Bose
Ranch Hand

Joined: Jan 21, 2011
Posts: 637

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) ?

SCJP 6. Learning more now.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

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.

[Asking smart questions] [About Bear] [Books by Bear]
Rohit Mehta
Ranch Hand

Joined: Mar 11, 2005
Posts: 79

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.
I agree. Here's the link:
subject: JSP becomes a servlet - implications
It's not a secret anymore!