[Mulgara-general] http config

Paul Gearon gearon at ieee.org
Tue Nov 3 20:59:48 UTC 2009


This chat may be better on the developer's mailing list, but I'm
leaving it here for the time being.

On Tue, Nov 3, 2009 at 3:37 PM, Gregg Reynolds <dev at mobileink.com> wrote:
> Hi list,
>
> After much gnashing of teeth I've figured out how to configure the embedded
> Jetty webserver using an xml file.  I need this because I need to have it
> serve up a static webpage containing ajax calls to the server; by having
> mulgara itself serve up the page I avoid the cross-domain security
> annoyance.  Without this I had to serve the page from a different webserver
> and hack doGet in ProtocolServlet.java so it would sent the correct
> Access-Control-Allow-Origin header.
>
> So my question is, what do I need to do to get the developers to think that
> serving static pages from e.g. public_html should be part of the default
> configuration?  I'd like to be able to tell my users to just download
> mulgara, copy some files into public_html, and let'r rip.

Sounds fine to me. There's already some static stuff in the
src/jar/web/resources directory. These are actually being served up by
the webUI applet (read-file/write-to-socket) but it works pretty much
like a static system.

We used to serve up the documentation locally through static pages as
well, so there's precedent for it.

> Second question is, is there any interest in converting the existing
> configuration logic into XML files?  I think I've figured out the code and I
> think all the Jetty configuration stuff could be migrated to XML files
> without disruption.  Might as well finish the job if it would be useful.  If
> this is out of the question please let me know so I don't waste time on it.

Most of the current configuration *is* in an XML file. Those things
that aren't being configured are because we didn't have a use case to
configure things.

If you are referring to which servlets and static directories should
be served, then that's something I'd *like* to put into the XML file,
but haven't had an opportunity to do yet.  Have a look at
org.mulgara.server.HttpServices.getContextStarters() to see the code
where I want to set this up. This method returns a list of
ContextStarters that describe the services to be started. At the
moment, this list is hard coded, but I would like to populate it from
the XML configuration.

Feel free to chat with me directly.

Regards,
Paul



More information about the Mulgara-general mailing list