Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2005

Tip: Looking for answers? Try searching our database.

JSP and Servlet

Thread view: 
az - 16 May 2005 02:32 GMT
Anyone can tell me what is the difference between JSP and Servlet? Thanks a lot!
Wendy S - 16 May 2005 03:15 GMT
> Anyone can tell me what is the difference between JSP and Servlet? Thanks
> a lot!

Chapter 11 and 12:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

Signature

Wendy

Wibble - 16 May 2005 04:12 GMT
JSP's are servlets that are code generated from
a template.  The template looks like some
extra tags in an HTML document, more or less.

> Anyone can tell me what is the difference between JSP and Servlet? Thanks a lot!
Ross Bamford - 17 May 2005 06:08 GMT
> Anyone can tell me what is the difference between JSP and Servlet? Thanks a lot!

JSP's are a terrible abomination, a blight in the technical history of
the human race, and the cause of more frustration, anger, breakdown and
suicide than any other software product since Visual J++.

Servlet is an interface in javax.servlet.

;)

Signature

  [Ross A. Bamford]     [ross AT the.website.domain]
Roscopeco Open Tech ++ Open Source + Java + Apache + CMF
http://www.roscopec0.f9.co.uk/ + info@the.website.domain

Alvin Ryder - 17 May 2005 06:55 GMT
> Anyone can tell me what is the difference between JSP and Servlet? Thanks a lot!

Servlets are written in pure Java. Requests for a web page go to a Java
program.

JSP's are HTML pages with some Java hacked into them. They are neither
pure HTML nor pure Java. It is a more limited and hybrid environment.

The big question is do you have Java outputing HTML or do you have HTML
trying to hook into code?

JSP's appear to provide some syntactic sugar as a solution, which
sounds nice but the limitations catch up very quickly.

Besides that to know how JSP's work you need to understand the Servlet
API anyway. Application scope, session scope, cookies, ... so it is not
a case of "one or the other".

Servlets can emit HTML and if you're wise you can do it in a tidy
fashion.

Most books and simple examples just do a crude out.print(...HTML
gut...) then go running to JSP for help but only to run from the frying
pan into the fire.

With Servlets you have the full power of a decent OO language at your
disposal, it is possible to do HTML simply and neatly with perhaps a
light dose of JSP.

The other path has led to progressive chaos!

First JSP
Then JSP + Taglibs
Then JSP + Taglibs + JSTL
Then JSP + Taglibs + JSTL + "EL" (Expression Language)
Then JSP + Taglibs + JSTL + "EL" + JSF (JavaServer Faces)

All because some people can't work out how to use OOP to output HTML
from Servlets in a reasonable OOP way.

JSF is to web pages what Swing is to GUI's so it's promising but that
is another topic.

HTH,
Cheers.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.