[Geoserver-users] Serve crossdomain.xml from server root using Jetty

I have GeoServer running on Jetty, which when accessed from the outside has a url of http://www.example.com:8080/geoserver. The jetty.xml file uses the XML below to set up the server, and it works just fine. I need the server to return a crossdomain xml file from the following url http://www.example.com:8080/crossdomain.xml. After reading through the documentation, I believe I need to use either a Resource Handler, or a root-level context in order to serve this file, but I have been unable to determine the correct XML syntax to do so.

Any suggestions/examples of what needs to be added to the jetty.xml file below in order to have the crossdomain file served properly would be greatly appreciated.

Thanks,

Heather

--------------------------jetty.xml excerpt ------------------

/webapps

/etc/webdefault.xml

True

True

--------------------------end jetty.xml excerpt----------------------------

Hi Heather,

I tried various configurations of jetty.xml and could not get this to work... but I am far from an experienced jetty user. I suggest you ask on the jetty users list, you will get a better answer there.

-Justin

Heather Kyle wrote:

I have GeoServer running on Jetty, which when accessed from the outside has a url of http://www.example.com:8080/geoserver. The jetty.xml file uses the XML below to set up the server, and it works just fine. I need the server to return a crossdomain xml file from the following url http://www.example.com:8080/crossdomain.xml. After reading through the documentation, I believe I need to use either a Resource Handler, or a root-level context in order to serve this file, but I have been unable to determine the correct XML syntax to do so.

Any suggestions/examples of what needs to be added to the jetty.xml file below in order to have the crossdomain file served properly would be greatly appreciated.

Thanks,

Heather

--------------------------jetty.xml excerpt ------------------

<Set name="handler">

      <New id="handlers" class="org.mortbay.jetty.handler.HandlerCollection">

        <Set name="handlers">

         <Array type="org.mortbay.jetty.Handler">

           <Item>

             <New id="contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>

           </Item>

           <Item>

             <New id="defaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>

           </Item>

           <Item>

             <New id="requestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>

           </Item>

         </Array>

        </Set>

      </New>

    </Set>

    <!-- =========================================================== -->

    <!-- Discover contexts from webapps directory -->

    <!-- =========================================================== -->

    <Call class="org.mortbay.jetty.webapp.WebAppContext" name="addWebApplications">

      <Arg><Ref id="contexts"/></Arg>

      <Arg><SystemProperty name="jetty.home" default="."/>/webapps</Arg>

      <Arg><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Arg>

      <Arg type="boolean">True</Arg> <!-- extract -->

      <Arg type="boolean">True</Arg> <!-- parent priority class loading -->

    </Call>

--------------------------end jetty.xml excerpt----------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.