File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSP and servlet 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 "JSP and servlet" Watch "JSP and servlet" New topic
Author

JSP and servlet

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
What is the difference between JSp and servlet.
Is there any life cyle difference.
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
A JSP is basically the source code for a servlet. The server simply provides you with certain shortcuts. For example, without the special tags (scriptlets, taglibs, directives, etc), the content is simply assumed to be sent to the response. The difference is that the server will compile your JSP into a .class file for you at execution time (if it has been changed or has not been previously compiled). From then on, it is treated the same as a servlet.


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

aakash, perform a search on this subject in this forum and the Servlets forum and you will find more information on this as it has been discussed many times before.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and servlet
 
Similar Threads
jsp vs servlet
JSP Interview Questions
Difference Between JSP and Servlet Session
jsp
JSP & Servlets