Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2003 17:15:30 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        David Banning <david+dated+1061425996.f64955@skytracker.ca>
Cc:        questions@freebsd.org
Subject:   Re: how-to run javascript on my server
Message-ID:  <20030816161530.GA97820@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <4325.209.188.66.29.1060993993.squirrel@sam.skytrackercanada.com>
References:  <4325.209.188.66.29.1060993993.squirrel@sam.skytrackercanada.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 15, 2003 at 08:33:13PM -0400, David Banning wrote:
> I have some menu server java applets I would like to run on my fbsd server
> but I have no idea where to get started. Some initial inquiries on Google
> have not brought any luck.
>=20
> Is there any sites that deal with this, or does anyone have a suggestion?

You appear to have become confused between Java and Javascript.  These
are very different things.  Javascript -- which probably should be
described as ECMAScript nowadays -- is a language superficially
similar to Java but that is interpreted within a web browser.
Unfortunately each different brand of browser has it's own idea of
what ECMAScript should be, and that makes it quite tricky to write a
web page that works reasonably in any browser. See
http://www.ecma-international.org/publications/standards/ECMA-262.HTM
for an attempt at providing a standard and
http://www-106.ibm.com/developerworks/unicode/library/wa-emca.html?dwzone=
=3Dunicode
for an explanation of what it is.  Javascript is either incorporated
directly into a web page or is served up in a separate file
(traditionally with a .js suffix) referenced from the page in
question.  Or in other words, just slap it into the documents
directory of your webserver alongside the .html files.

Java on the other hand is a recent addition to the C-like language
group which has the distinction of running in a virtual machine.
This, together with the inherent object-orientation of the language
and Sun's fanatical dedication to preserving the language standards
means that *compiled* Java class files can be run unmodified on any
platform that supports Java.

Java is a general purpose language, and standalone Java applications
are certainly available.  However, most people will run into Java in
the contexts of "applets".  This is a mini java application that can
be downloaded via a web browser and run in a limited "sandbox" context
on the local machine.  See for instance
http://gregegan.customer.netspace.net.au/APPLETS/Applets.html for an
interesting selection of mathematics oriented examples.

However, what I suspect you have are the converse of that: java
servlets.  These are mini-applications that run as part of a web
*server*.  These are conceptually similar to other dynamic web
languages, like PHP, ASP or some sorts of embedded mod_perl stuff, but
the scope is larger: as well as the dynamic .jsp pages (which are
internally converted to java code and compiled into Java servlets on
the fly) there are also pre-compiled Java classes of various types.
In order to serve such "webapps" to the net in general, you will need
a Java servlet container.  That's a webserver written in Java with all
the necessary internal wiring to be able to load up the webapp object
structure.  There are several available in ports: the various
jakarta-tomcat versions (www/jakarta-tomcat*)and Jetty (www/jetty).

But wait! There's more.  The webapp servlet stuff corresponds roughly
to the middle (logic) tier of a 3-tier application.  There's an
equivalent setup "Enterprise Java Beans" which (very roughly)
corresponds to the 3rd (data) layer in a 3-tier application -- the
'Java Bean' is often an object abstraction for accessing an underlying
RDBMS, but it's not limited to that.  [The web browser and any
associated Java applets or javascript would form the 1st
(presentation) layer in this concept].  See the java/jboss3 port for a
freely available EJB server -- an alternative to the default J2EE
stuff that Sun supplies, but which isn't actually available on FreeBSD
as far as I know.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/PliidtESqEQa7a0RAoVOAJ9e0exxS/JnHnqMZ3cwcnQ3vWkSpwCggL3B
zrfVvqsj/pROt6vzqOcbOvQ=
=Mfae
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030816161530.GA97820>