List Info

Thread: URL Mapping issue




URL Mapping issue
country flaguser name
United States
2008-06-11 10:09:34
The last hurdle in my slide to jackrabbit adventure is in
the mapping of the URL in jetty. As I said before, the goal
was to simply replace slide with jetty and to not have to
change code.

In the jetty config the context for slide was set up as
follows:
    <New id="SlideContext"
class="org.mortbay.jetty.webapp.WebAppContext">

			<Arg><Ref
id="contexts"/></Arg>
      <Arg><SystemProperty
name="jetty.home"
default="."/>/webapps/slide/</Arg>
      <Arg>/MyRepository</Arg>
    </New>

So any requests to http://hostname:por
t/MyRepository went to slide and I assume that slide
just had one repository that contained all the files that
are being requested via WEBDAV.

For jackrabbit I have created a repository named
MyRepository, changed the web.xml in the
jackrabbit-webapp-1.4.war to not require the /repository (as
you have helped me to understand) and set up a context for
jackrabbit as follows:
    <New id="JackRabbitContext"
class="org.mortbay.jetty.webapp.WebAppContext">

			<Arg><Ref
id="contexts"/></Arg>
      <Arg><SystemProperty
name="jetty.home"
default="."/>/webapps/jackrabbit-webapp-1.4.war
</Arg>
      <Arg>/</Arg>
    </New>

And this works great for accessing the content from
MyRepository using the same URL http://hostname:por
t/MyRepository, so no code needs to be changed. The
obvious problem with this is that to get it to work I needed
to comment out the home page context:
<!--
   <New id="HomeContext"
class="org.mortbay.jetty.webapp.WebAppContext">

      <Arg><Ref
id="contexts"/></Arg>
      <Arg><SystemProperty
name="jetty.home"
default="."/>/webapps/mqs/</Arg>
      <Arg>/</Arg>
    </New>
-->
so that all requests would go to jackrabbit. But I need the
home context too. If I set the context for jackrabbit to map
to /MyRepository, then requests to http://hostname:por
t/MyRepository generate HTTP ERROR:500's.

I realize that this is probably more of a jetty config
puzzle, but any help that you can give would be greatly
appreciated.

Thanks

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )