[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] RE: useful servlet
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] RE: useful servlet |
Date: |
Tue, 11 Feb 2003 18:15:41 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 |
Tom Reilly wrote:
No hurry, I was particulary interested in what you thought
of the patch to XQuery.java.
I think it is ugly for the XQuery constructor to set
the current state as a side-effect. The loadClass
calls need it to be set, alas, but I think it at
least does need to be restored. And this should be
done in the XQuery constructor, not getInstance.
I just checked in a patch to do this. I think the
proper place to call Environment.setCurrent is in
the registerEnvironment method, as for Scheme, so
I fixed that as well.
To make KawaPageServlet not crash, we need to do
the same there:
Interpreter interp =
Interpreter.getInstanceFromFilenameExtension(path);
Interpreter.defaultInterpreter = interp;
Environment.setCurrent(interp.getEnvironment());
I've reviewed the KawaPageServlet code. It looks good,
but I have a few more notes/questions:
Why doesn't KawaPageServlet inherit from KawaServlet? It seems
like there is fair bit of needless duplication.
The variable $request isn't getting bound. I haven't looked
into why yet.
Can parameters have hyphens? If so should "saveClass" perhaps
be a Qexo-specific name like "qexo-save-class"?
--
--Per Bothner
address@hidden http://www.bothner.com/per/