Re: how-to run javascript on my server

2003-08-17 Thread David Banning
 First of all.  Java and Java script are two different things. I take it 
 you use Java. Your Java applets don't run on the server but on the 
 client. The main problem from a server point of view is that you need 
 to make sure that the class files can be handed out by the webserver.
 
 You could check these thing:
 - Does your client Java installed?
 - Does your client the Java version installed that you use? (I.e you 
   use commands of version 2.0 and you client has 1.2)
 - Does your client know how to get the class files?
 - Does your server hand them corretly out? (You could check 
   /var/log/httpd-*.log if you use apache)
 
 As far for websites: java.sun.com is the main site you want to look at. 
 It has great tutorials, howtos and user support groups.

Thanks alot for your help Alex. I was able to get them running rather
easily. I just put the files in the web directly and the clients
-do- read them just fine. Thanks for your help.

For some reason I thought that I need the apache-jserv modules to be
loaded. I guess I don't. That still leaves me wondering what apache-jserv
Servlet Engine which exists in the ports -does-, but since I am already
where I need to be, I will read on that perhaps some other day.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how-to run javascript on my server

2003-08-16 Thread Lowell Gilbert
David Banning [EMAIL PROTECTED] writes:

 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.
 
 Is there any sites that deal with this, or does anyone have a suggestion?

To start with, your subject line mentions Javascript, while the
message itself seems to be about Java.  These are completely separate
topics, so you need to decide exactly what you mean before anybody
else can figure it out.

For server-side applications, Apache will just run them as CGI
regardless of what language they're written in.  
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how-to run javascript on my server

2003-08-16 Thread Matthew Seaman
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.
 
 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=unicode
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

-- 
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


pgp0.pgp
Description: PGP signature


Re: how-to run javascript on my server

2003-08-16 Thread Alex de Kruijff
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.
 
 Is there any sites that deal with this, or does anyone have a suggestion?
 

First of all.  Java and Java script are two different things. I take it 
you use Java. Your Java applets don't run on the server but on the 
client. The main problem from a server point of view is that you need 
to make sure that the class files can be handed out by the webserver.

You could check these thing:
- Does your client Java installed?
- Does your client the Java version installed that you use? (I.e you 
  use commands of version 2.0 and you client has 1.2)
- Does your client know how to get the class files?
- Does your server hand them corretly out? (You could check 
  /var/log/httpd-*.log if you use apache)

As far for websites: java.sun.com is the main site you want to look at. 
It has great tutorials, howtos and user support groups.

-- 
Alex

Articles based on solutions that I use:
http://www.kruijff.org/alex/index.php?dir=docs/FreeBSD/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]