This is the mail archive of the kawa@sources.redhat.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]
Other format: [Raw text]

Re: Having an embedded kawa respond to http requests


On Wed, 26 Mar 2003 09:47:59 -0000
Niall Dalton <ndalton at Lastminute dot com> wrote:

> > In my opinion, you will quickly want to be able to format 
> > your results as HTML web-pages, etc...
> > 
> > --> embed as well a Servlet engine in your 
> > application...maybe this one: 
> > http://jetty.mortbay.com/jetty/index.html
>  
> Ok, sounds reasonable to me! Jetty looks really easy to embed,
> but I must admit I haven't played with servlets etc. before. 
> I have a quick hack on repl, that implements the Runnable interface,
> where the run method essentially is the same code as the --server
> option in repl. This is just quick proof of concept type stuff!
> How do you think the jetty stuff can be made to talk to kawa
> inside my app - where the interpreter needs to have access to
> the app objects? 


I do not suggest to use Kawa as a servlet, rather to make a servlet which parses the http parameters, and which keeps an instance of a Kawa iterpreter as a state variable (not instantiated for every http connection, but in the Init() method of the Servlet). It could then evaluate a command, builded from the Http parameters. 

you could bind a variable in your Kawa interpreter (using "define") with one of your application objects, or have a static method giving access to your application objects, that can be accessed from kawa...

what do you think?

seems clear?

How could I access my apps objects if I have
> kawa as a servlet? Hints appreciated!
> 
> niall
> 
> 
> ------------------------------
> 
> This e-mail is intended for the named addressee only.  It may contain confidential and/or privileged information.  If you have received this message in error, please let us know and then delete this message from your system.  You should not copy the message, use it for any purpose or disclose its contents to anyone.
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
> 


-- 

Stanislas Pinte

Computer Consultant

	98, rue Bois l'Evêque
	B-4000 Liège

web:		http://www.altosw.be
email:		alto_stan at wanadoo dot be


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