Hi,
Or if you are javascript centric, you can just write the web server in javascript - which I am doing. Since I am an ex Java programmer my first goal was to write a very basic java web server (no servlets) and then be able to add javascript "processors" - such as a file processor to serve directories etc. But as I have learned more about javascript I have rewritten more and more of it in javascript. It is both a great way to learn javascript and to have fun.
Terry


Cormac Redmond wrote:
Hi,

You say you have Rhino running via the shell. The next step for you would be
getting it running completely in a Java class.
Then, you could use a Servlet containter like tomcat. That will allow you
to, for example, run server-side Java code when a user clicks a button on a
webpage. This Java code will itself initialise Rhino and evaluate some
script, which will return a result to the Java code.

Setting this up is easy (but this is not the place to explain it). Have a
quick google for "tomcat jsp tutorial". Or even better "JSF tutorial".

Again, start off by getting Rhino up-and-running in a Java class. The Rhino
tutorials have dozens of simple examples.


Cheers,
Cormac

2008/12/23 Geuis <[email protected]>

How can I connect Rhino and a web server, such as apache or lighttpd,
so that incoming web requests are handed from the server to Rhino to
run server-side JS scripts, then return the result to the server for
delivery to the browser?

I've got Rhino running via shell and have been having fun playing
around with it from the command line, but now I'd like to try my hand
at getting Rhino to act like an interpreter to interact with the
browser client.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to