tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Smith" <>
Subject Re: JSP vs Servlets...
Date Sun, 05 Nov 2000 03:03:18 GMT

Try the following experiment. Put the source code
below into a file called hello.jsp in the /examples/ROOT directory:

<%! String hello; %>
<% hello = "Hello World"; %>

Access this file by using


in your browser. Now look in the
tomcat work directory. You will see 
a folder called something like localhost_8080.
In that folder will be some files with an odd
names like
and 0001fhello_0001ejsphello.class. This
is the source code for the JSP. If you look at
it you'll see it is basically a servlet -- pretty much
what you would write by hand to say "Hello World".

The JavaServer Pages system is merely a way to 
quickly produce servlets that would otherwise be
very tedious to write by hand. 


----- Original Message ----- 
From: "Rui Oliveira" <>
To: <>
Sent: Wednesday, December 20, 2000 11:39 AM
Subject: JSP vs Servlets...

> Hello,
> can someone tell me which one is best: JSP or Servlets?
> Is there a reason (beside implementatio reasons) to choose one instead
> of the other?
> Thx in advance
> Rui

View raw message