qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] XqlServlet


From: Per Bothner
Subject: Re: [Qexo-general] XqlServlet
Date: Mon, 13 Jan 2003 23:30:19 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

Ivelin Ivanov wrote:
I am considering writing and donating back to you a servlet (XqlServlet)
which works like
a JspServlet, only for XQL files.

I assume you're aware that a Qexo program can be compiled directly
to a servlet, so I'm a little unclear exactly how what you're
attempting is different from what exists.  The automation aspects?

It will eventually detect changes in .xql source files, compile them, load
and execute.

This stuff *is* missing - i.e. the integation/infrastructure hooks.

I have done some research and this what I found so far:

1) You can run an arbitrary file with:
Shell.runFile(initFile.getPath())

2) If you extend a KawaServlet you implement apply(CallContext), where the
CallContext is a ServletCallContext.

What I cannot figure out easily yet is how do I pass the CallContext to the
Shell, so that the XQL files has access to the request and response
variables.

I think that's the wrong approach.  It is better to just compile the
XQuery program directly to a servlet.

However, you could create a ServletCallContext, and then set it
with CallContext.setInstance.  Then when Shell calls
CallContext.getInstance it shoudl get that ServletCallContext,
bcause CallContexts are associated with threads.

BTW, I am using 1.6.98. I know it is not the latest.

Yes, please use the CVS version.  (I'm trying to get 1.7
released, but my day job will delay things.)

from your example. It appears that $request/requestURI, $request/method and
$request/pathInfo are not resolved to what is expected.

This is kind-of a kludge and I'm not 100% sure I want to keep
supporting this syntax. request-uri(), request-method(), and request-path-info() are cleaner and more efficient. They are
documented in the Kawa manual.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]