aspose file tools*
The moose likes Servlets and the fly likes Difference between JSP and Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Difference between JSP and Servlets" Watch "Difference between JSP and Servlets" New topic
Author

Difference between JSP and Servlets

vibhor mathur
Greenhorn

Joined: Jun 06, 2009
Posts: 11
hello everybody
What is the difference between servlets and JSP?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you searched the web for the answers to this?

In a nutshell, servlets are written in Java. JSPs are plain-text files that get converted into equivalent servlets.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Here is a link that might help

Search

A related article

Article


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Vamsi Mohan
Ranch Hand

Joined: Jun 20, 2009
Posts: 80
[copied material removed -- do not copy material from other sites without references]


VAMSI MOHAN.V
(SCJP5.0, IBM Rational Solution Designer, IBM Rational Architect, IBM RUP Designer)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

Vamsi Mohan wrote:A Java Server Page is a completely web based content. JSP pages contain a mixture of HTML, Java scripts (not to be confused with JavaScript) ...

Although the use of Java scriptlets in JSP pages is considered a poor practice at this juncture, replaced by the JSTL and EL.

And, a JSP can certainly contain JavaScript. Think of a JSP as a template for an HTML page.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@Vamsi: when quoting other sources it's nice to provide a reference.
Prashant Langade
Ranch Hand

Joined: Jul 01, 2009
Posts: 71
Servlet's are java programs which gets executed on server and JSP's are used for showing server response to end user.Thus in short Servlet's are used for request processing while JSP's are used for presentation logic.

Hope this helps you!!!



Prashant
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between JSP and Servlets