The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

difference between jsp and servlets

Posted by Matt Gerrans on December 08, 2001 at 4:05 PM


> hi,
> can anybody mail me the difference between jsp and servlets.
> it's very urgent.
> thanks

JSP is Java code embedded in HTML; the Java code is compiled (if necessary) and run by the container on the server and the client only sees the results of that code's execution mixed in appropriately with the html.

Servlets are compiled pure Java class files (not mixed with HTML) that get posts from the client and send html to in return.

Both require a container on the server, such as Tomcat, which provides the environment and VM for the Java program. Download Tomcat from http://jakarta.apache.org/tomcat/ -- it has samples of both.

- mfg




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us