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

Confusion between the use of JSP

vineet chauhan

Joined: Oct 30, 2010
Posts: 1

I read that JSP are used for presentation and servlets for writing business logic . But the jsp are themselves converted into servlets. Then why we are we using jsp if they are converted back into servlets again.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

The fact that JSPs leverage servlets is an implementation detail. It should in no way affect how they are used.

[Asking smart questions] [About Bear] [Books by Bear]
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

Yes... JSP was brought for Presentation Logic... And writing Business Logic in Servlets is a bad design... Then, that business logic cannot be re-used. Servlets makes the decision of redirection to other pages based on the condition.

JSP is basically a Servlet which has the life-cycle of initialization, servicing the request and destroyed...

SCJP 6 [SCJP - Old is Gold]
I agree. Here's the link:
subject: Confusion between the use of JSP
It's not a secret anymore!