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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60806

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

[Asking smart questions] [Bear's FrontMan] [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]
jQuery in Action, 2nd edition
subject: Confusion between the use of JSP
Similar Threads
Can Jsp dispatch request as Servlets
Doubt in JSP specfications
Difference between servlet and jsp?
Servlet of a JSP
jsp to servlet