wood burning stoves 2.0*
The moose likes Servlets and the fly likes What's the difference between servlet and jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What Watch "What New topic
Author

What's the difference between servlet and jsp?

T'R Dai
Greenhorn

Joined: Nov 28, 2010
Posts: 14
What's the difference between servlet and jsp, who can tell me in simple words?


I want to be friend with you.let's learn java together.
tyrone198810@hotmail.com
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Servlet is designed to do processing but not display, JSP designed to do display but not processing.
T'R Dai
Greenhorn

Joined: Nov 28, 2010
Posts: 14
David O'Meara wrote:Servlet is designed to do processing but not display, JSP designed to do display but not processing.

thank you!
Colin Wang
Greenhorn

Joined: Nov 24, 2010
Posts: 4
Tianrong Dai wrote:What's the difference between servlet and jsp, who can tell me in simple words?

JSP will be translated into servlet.
T'R Dai
Greenhorn

Joined: Nov 28, 2010
Posts: 14
colin wang wrote:
Tianrong Dai wrote:What's the difference between servlet and jsp, who can tell me in simple words?

JSP will be translated into servlet.

your means that servlet can do everything what jsp can do?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

colin wang wrote:JSP will be translated into servlet.

That is an implementation detail that has no bearing on when JSPs should be used and when servlets should be used.

Tianrong Dai wrote:your means that servlet can do everything what jsp can do?

Not really. JSPs can use mechanisms such as the JSTL, EL, custom tags, tag files, and other mechanisms geared towards creating views. Mimicking these in a servlet would not only be difficult, but foolish.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
T'R Dai
Greenhorn

Joined: Nov 28, 2010
Posts: 14
Bear Bibeault wrote:
colin wang wrote:JSP will be translated into servlet.

That is an implementation detail that has no bearing on when JSPs should be used and when servlets should be used.

Tianrong Dai wrote:your means that servlet can do everything what jsp can do?

Not really. JSPs can use mechanisms such as the JSTL, EL, custom tags, tag files, and other mechanisms geared towards creating views. Mimicking these in a servlet would not only be difficult, but foolish.


oh,i see,thank you very much.
 
wood burning stoves
 
subject: What's the difference between servlet and jsp?
 
Similar Threads
jsp vs servlet
[Glassfish, EJB3, web client] EJB name vs. mappedName, JSP and dependency injection
Diff between Servlet and Jsp
jsp
JSP & Servlets