This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Kawa Servlets


>>> Per Bothner <per@bothner.com> 10-Mar-00 4:31:16 AM >>>

>It might be worth adding special cmpiler support for servlets, like
I
>recently did for applets.  (If you compile with --applet, then the
>"main" class inherits from Applet.  We might do something similar
>with --servlet - though I prefer a more generalizable solution.

Surely one of the easiest things to do is have a SchemeServlet.java
that can be configured via an init parameter to run a particular
scheme program (this is what I am doing right now).

The methods doGet, doPost and so on would be mapped to whatever
Scheme file it was mapping to by simply calling eval(). This allows a
certain level of mangling of the servlet engine internals.

For example there should be one Scheme environment per
servlet-context.


I agree it would be nice to be able to have total control over the
resulting class from scheme compilation, including what package forms
compile to and any class they will extend. 

But it's kinda hard before the module system is in place. Once the
module sysyem is in place it would be good to have an argument (when
you declare a module) to indicate what package the resulting class
will belong to and any class it extends.

Of course that raises great difficulty in terms of syntax errors
because a sub class must declare constructors of the right type and so
forth. Perhaps we can accept the restriction of you only extend
classes that have no-arg constructors. For anything else use the
current system (anonymous classes).


Nic Ferrier

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]