TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:886] speaking of web stuff
- To: tclug-list@listserv.real-time.com
- Subject: Re: [TCLUG:886] speaking of web stuff
- From: Bob Tanner <tanner@real-time.com>
- Date: Tue, 11 Aug 1998 13:18:46 -0500
- In-Reply-To: <Pine.LNX.Donut v3.96.980811122625.14083A-100000@jellyd.deskmedia.com>; from JoshB [JellyD] on Tue, Aug 11, 1998 at 12:28:55PM -0500
- Mail-Followup-To: tclug-list@listserv.real-time.com
- References: <19980811004753.A5341@wizard.real-time.com> <Pine.LNX.Donut v3.96.980811122625.14083A-100000@jellyd.deskmedia.com>
Quoting JoshB [JellyD] (joshb@techie.com):
> I love the JServ module, because it means I don't hafta code in C or perl
> =). I haven't gotten the module to compile with whatever apache version
> I've got right now, probably because I'm too lazy to track down a stupid
> little problem.
>
> What's the difference between using what you described of GSP, above
> (which I've never used) and using the <SERVLET> tag with JServ ?
GSP allows you to embed java right in the html. Like this:
<html>
<head>
<title>This is a test</title>
</head>
<body bgcolor="#ffffff">
<h1>Date Test</h1>
<!-- you can place imports anywhere on the page..
we recommend you place them near the top :-) -->
<java type="import">java.util.Date</java>
<java>
Date d = new Date();
out.println("The current date is: " + d);
</java>
<p><hr><p>
Did you see the date?
</body>
</html>
So it is similar to <servlet> tags, but you do not have to write as
much code. A servlet is great if you need to do a 1 shot output of
data. GSP allows for embedded java and html code where the logic of
java can dictate the output of the html.
--
Bob Tanner <tanner@real-time.com> | Phone : (612)943-8700
http://www.real-time.com | Fax : (612)943-8500
Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9