• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion between the use of JSP

 
vineet chauhan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact that JSPs leverage servlets is an implementation detail. It should in no way affect how they are used.
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic