Making one app the root context

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Making one app the root context

Martin Holmes
eXist 3.0 built from develop branch today, just run from the build, not
installed with the installer.

In my controller-config.xml, I can do this:

   <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
   <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>

which means that if I go here:

   localhost:8080/exist/

my app (moeml) appears, and if I go here:

   http://localhost:8080/exist/apps/dashboard/

I get the dashboard and the other apps.

However, I'd like to be able to remove the /exist/ bit of the path, so
that I get my app here:

   http://localhost:8080/

and the other apps here:

   http://localhost:8080/apps/dashboard/

I've tried adding this into the tools/jetty/etc/jetty.xml file:

   <Array type="org.eclipse.jetty.server.Handler">
           <Item>
             <New id="exist-webapp-context"
                class="org.exist.jetty.WebAppContext">
               <!-- can either be '/exist' or '/' -->
               <Set name="contextPath">/</Set>
[...]

but eXist fails to start. I've tried making a similar change in
tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
difference. Is there a straightforward way to do this?

Cheers,
Martin



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Dmitriy Shabanov


On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]> wrote:
eXist 3.0 built from develop branch today, just run from the build, not
installed with the installer.

In my controller-config.xml, I can do this:

   <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
   <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>

which means that if I go here:

   localhost:8080/exist/

my app (moeml) appears, and if I go here:

   http://localhost:8080/exist/apps/dashboard/

I get the dashboard and the other apps.

However, I'd like to be able to remove the /exist/ bit of the path, so
that I get my app here:

   http://localhost:8080/

and the other apps here:

   http://localhost:8080/apps/dashboard/

I've tried adding this into the tools/jetty/etc/jetty.xml file:

   <Array type="org.eclipse.jetty.server.Handler">
           <Item>
             <New id="exist-webapp-context"
                class="org.exist.jetty.WebAppContext">
               <!-- can either be '/exist' or '/' -->
               <Set name="contextPath">/</Set>
[...]

but eXist fails to start. I've tried making a similar change in
tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
difference. Is there a straightforward way to do this?

You should update tools/jetty/webapps/exist-webapp-context.xml

--
Dmitriy Shabanov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Dmitriy Shabanov
On Tue, Feb 28, 2017 at 12:00 PM, Dmitriy Shabanov <[hidden email]> wrote:


On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]> wrote:
eXist 3.0 built from develop branch today, just run from the build, not
installed with the installer.

In my controller-config.xml, I can do this:

   <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
   <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>

which means that if I go here:

   localhost:8080/exist/

my app (moeml) appears, and if I go here:

   http://localhost:8080/exist/apps/dashboard/

I get the dashboard and the other apps.

However, I'd like to be able to remove the /exist/ bit of the path, so
that I get my app here:

   http://localhost:8080/

and the other apps here:

   http://localhost:8080/apps/dashboard/

I've tried adding this into the tools/jetty/etc/jetty.xml file:

   <Array type="org.eclipse.jetty.server.Handler">
           <Item>
             <New id="exist-webapp-context"
                class="org.exist.jetty.WebAppContext">
               <!-- can either be '/exist' or '/' -->
               <Set name="contextPath">/</Set>
[...]

but eXist fails to start. I've tried making a similar change in
tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
difference. Is there a straightforward way to do this?

You should update tools/jetty/webapps/exist-webapp-context.xml

Also, remove (or update) tools/jetty/webapps/portal/WEB-INF/jetty-web.xml (I don't know why that settings file there)

--
Dmitriy Shabanov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Martin Holmes
In reply to this post by Dmitriy Shabanov
That works! Many thanks.

This should probably be documented somewhere; I expect it's a fairly
common requirement.

Cheers,
Martin

On 2017-02-28 01:00 AM, Dmitriy Shabanov wrote:

>
>
> On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     eXist 3.0 built from develop branch today, just run from the build, not
>     installed with the installer.
>
>     In my controller-config.xml, I can do this:
>
>        <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
>        <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>
>
>     which means that if I go here:
>
>        localhost:8080/exist/
>
>     my app (moeml) appears, and if I go here:
>
>        http://localhost:8080/exist/apps/dashboard/
>     <http://localhost:8080/exist/apps/dashboard/>
>
>     I get the dashboard and the other apps.
>
>     However, I'd like to be able to remove the /exist/ bit of the path, so
>     that I get my app here:
>
>        http://localhost:8080/
>
>     and the other apps here:
>
>        http://localhost:8080/apps/dashboard/
>     <http://localhost:8080/apps/dashboard/>
>
>     I've tried adding this into the tools/jetty/etc/jetty.xml file:
>
>        <Array type="org.eclipse.jetty.server.Handler">
>                <Item>
>                  <New id="exist-webapp-context"
>                     class="org.exist.jetty.WebAppContext">
>                    <!-- can either be '/exist' or '/' -->
>                    <Set name="contextPath">/</Set>
>     [...]
>
>     but eXist fails to start. I've tried making a similar change in
>     tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
>     difference. Is there a straightforward way to do this?
>
>
> You should update tools/jetty/webapps/exist-webapp-context.xml
>
> --
> Dmitriy Shabanov
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Peter Stadler
In reply to this post by Dmitriy Shabanov
Just as a follow up: I deleted the whole directory tools/jetty/webapps/portal and configured eXist only via tools/jetty/webapps/exist-webapp-context.xml. This reduces the configured contexts to only one.
I echo Dmitriy’s question why that (portal) setting’s there?

Best
Peter

> Am 28.02.2017 um 10:05 schrieb Dmitriy Shabanov <[hidden email]>:
>
> Also, remove (or update) tools/jetty/webapps/portal/WEB-INF/jetty-web.xml (I don't know why that settings file there)

--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Dannes Wessels-3
It is a long time ago, but it is required to have the ‘portal’ web app to be available on “/“ ………
otherwise it would only be available on /portal

I followed the jetty documentation, that is all;

On 3 Mar 2017, at 13:45 , Peter Stadler <[hidden email]> wrote:

Just as a follow up: I deleted the whole directory tools/jetty/webapps/portal and configured eXist only via tools/jetty/webapps/exist-webapp-context.xml. This reduces the configured contexts to only one.
I echo Dmitriy’s question why that (portal) setting’s there?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Martin Holmes
In reply to this post by Martin Holmes
This no longer seems to be working in the new 3.1 release. I'm still
seeing the tools/jetty/webapps/portal/index.html file, which redirects
explicitly to /exist, instead of my app. I've changed
controller-config.xml in two locations, and four instances of <Set
name="contextPath"> in the tools/jetty/etc folder.

Has something changed since a couple of weeks ago?

Cheers,
Martin

On 2017-02-28 08:44 AM, Martin Holmes wrote:

> That works! Many thanks.
>
> This should probably be documented somewhere; I expect it's a fairly
> common requirement.
>
> Cheers,
> Martin
>
> On 2017-02-28 01:00 AM, Dmitriy Shabanov wrote:
>>
>>
>> On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     eXist 3.0 built from develop branch today, just run from the build, not
>>     installed with the installer.
>>
>>     In my controller-config.xml, I can do this:
>>
>>        <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
>>        <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>
>>
>>     which means that if I go here:
>>
>>        localhost:8080/exist/
>>
>>     my app (moeml) appears, and if I go here:
>>
>>        http://localhost:8080/exist/apps/dashboard/
>>     <http://localhost:8080/exist/apps/dashboard/>
>>
>>     I get the dashboard and the other apps.
>>
>>     However, I'd like to be able to remove the /exist/ bit of the path, so
>>     that I get my app here:
>>
>>        http://localhost:8080/
>>
>>     and the other apps here:
>>
>>        http://localhost:8080/apps/dashboard/
>>     <http://localhost:8080/apps/dashboard/>
>>
>>     I've tried adding this into the tools/jetty/etc/jetty.xml file:
>>
>>        <Array type="org.eclipse.jetty.server.Handler">
>>                <Item>
>>                  <New id="exist-webapp-context"
>>                     class="org.exist.jetty.WebAppContext">
>>                    <!-- can either be '/exist' or '/' -->
>>                    <Set name="contextPath">/</Set>
>>     [...]
>>
>>     but eXist fails to start. I've tried making a similar change in
>>     tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
>>     difference. Is there a straightforward way to do this?
>>
>>
>> You should update tools/jetty/webapps/exist-webapp-context.xml
>>
>> --
>> Dmitriy Shabanov
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> Exist-open mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Adam Retter
Nothing has changed in this area with regards 3.0

On 8 Mar 2017 5:57 p.m., "Martin Holmes" <[hidden email]> wrote:
This no longer seems to be working in the new 3.1 release. I'm still
seeing the tools/jetty/webapps/portal/index.html file, which redirects
explicitly to /exist, instead of my app. I've changed
controller-config.xml in two locations, and four instances of <Set
name="contextPath"> in the tools/jetty/etc folder.

Has something changed since a couple of weeks ago?

Cheers,
Martin

On 2017-02-28 08:44 AM, Martin Holmes wrote:
> That works! Many thanks.
>
> This should probably be documented somewhere; I expect it's a fairly
> common requirement.
>
> Cheers,
> Martin
>
> On 2017-02-28 01:00 AM, Dmitriy Shabanov wrote:
>>
>>
>> On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     eXist 3.0 built from develop branch today, just run from the build, not
>>     installed with the installer.
>>
>>     In my controller-config.xml, I can do this:
>>
>>        <root pattern="/apps/moeml/apps" path="xmldb:exist:///db/apps/"/>
>>        <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>
>>
>>     which means that if I go here:
>>
>>        localhost:8080/exist/
>>
>>     my app (moeml) appears, and if I go here:
>>
>>        http://localhost:8080/exist/apps/dashboard/
>>     <http://localhost:8080/exist/apps/dashboard/>
>>
>>     I get the dashboard and the other apps.
>>
>>     However, I'd like to be able to remove the /exist/ bit of the path, so
>>     that I get my app here:
>>
>>        http://localhost:8080/
>>
>>     and the other apps here:
>>
>>        http://localhost:8080/apps/dashboard/
>>     <http://localhost:8080/apps/dashboard/>
>>
>>     I've tried adding this into the tools/jetty/etc/jetty.xml file:
>>
>>        <Array type="org.eclipse.jetty.server.Handler">
>>                <Item>
>>                  <New id="exist-webapp-context"
>>                     class="org.exist.jetty.WebAppContext">
>>                    <!-- can either be '/exist' or '/' -->
>>                    <Set name="contextPath">/</Set>
>>     [...]
>>
>>     but eXist fails to start. I've tried making a similar change in
>>     tools/jetty/standalone-webapps/exist-webapp-context.xml, but it makes no
>>     difference. Is there a straightforward way to do this?
>>
>>
>> You should update tools/jetty/webapps/exist-webapp-context.xml
>>
>> --
>> Dmitriy Shabanov
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> Exist-open mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Martin Holmes
I was forgetting to deal with that portal thing. Deleting the whole
portal folder seems to solve it.

Cheers,
Martin

On 2017-03-08 10:03 AM, Adam Retter wrote:

> Nothing has changed in this area with regards 3.0
>
> On 8 Mar 2017 5:57 p.m., "Martin Holmes" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     This no longer seems to be working in the new 3.1 release. I'm still
>     seeing the tools/jetty/webapps/portal/index.html file, which redirects
>     explicitly to /exist, instead of my app. I've changed
>     controller-config.xml in two locations, and four instances of <Set
>     name="contextPath"> in the tools/jetty/etc folder.
>
>     Has something changed since a couple of weeks ago?
>
>     Cheers,
>     Martin
>
>     On 2017-02-28 08:44 AM, Martin Holmes wrote:
>     > That works! Many thanks.
>     >
>     > This should probably be documented somewhere; I expect it's a fairly
>     > common requirement.
>     >
>     > Cheers,
>     > Martin
>     >
>     > On 2017-02-28 01:00 AM, Dmitriy Shabanov wrote:
>     >>
>     >>
>     >> On Tue, Feb 28, 2017 at 2:55 AM, Martin Holmes <[hidden email]
>     <mailto:[hidden email]>
>     >> <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >>
>     >>     eXist 3.0 built from develop branch today, just run from the
>     build, not
>     >>     installed with the installer.
>     >>
>     >>     In my controller-config.xml, I can do this:
>     >>
>     >>        <root pattern="/apps/moeml/apps"
>     path="xmldb:exist:///db/apps/"/>
>     >>        <root pattern=".*" path="xmldb:exist:///db/apps/moeml"/>
>     >>
>     >>     which means that if I go here:
>     >>
>     >>        localhost:8080/exist/
>     >>
>     >>     my app (moeml) appears, and if I go here:
>     >>
>     >>        http://localhost:8080/exist/apps/dashboard/
>     <http://localhost:8080/exist/apps/dashboard/>
>     >>     <http://localhost:8080/exist/apps/dashboard/
>     <http://localhost:8080/exist/apps/dashboard/>>
>     >>
>     >>     I get the dashboard and the other apps.
>     >>
>     >>     However, I'd like to be able to remove the /exist/ bit of the
>     path, so
>     >>     that I get my app here:
>     >>
>     >>        http://localhost:8080/
>     >>
>     >>     and the other apps here:
>     >>
>     >>        http://localhost:8080/apps/dashboard/
>     <http://localhost:8080/apps/dashboard/>
>     >>     <http://localhost:8080/apps/dashboard/
>     <http://localhost:8080/apps/dashboard/>>
>     >>
>     >>     I've tried adding this into the tools/jetty/etc/jetty.xml file:
>     >>
>     >>        <Array type="org.eclipse.jetty.server.Handler">
>     >>                <Item>
>     >>                  <New id="exist-webapp-context"
>     >>                     class="org.exist.jetty.WebAppContext">
>     >>                    <!-- can either be '/exist' or '/' -->
>     >>                    <Set name="contextPath">/</Set>
>     >>     [...]
>     >>
>     >>     but eXist fails to start. I've tried making a similar change in
>     >>     tools/jetty/standalone-webapps/exist-webapp-context.xml, but
>     it makes no
>     >>     difference. Is there a straightforward way to do this?
>     >>
>     >>
>     >> You should update tools/jetty/webapps/exist-webapp-context.xml
>     >>
>     >> --
>     >> Dmitriy Shabanov
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >>
>     >>
>     >> _______________________________________________
>     >> Exist-open mailing list
>     >> [hidden email]
>     <mailto:[hidden email]>
>     >> https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>     >>
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>     ------------------------------------------------------------------------------
>     Announcing the Oxford Dictionaries API! The API offers world-renowned
>     dictionary content that is easy and intuitive to access. Sign up for an
>     account today to start using our lexical data to power your apps and
>     projects. Get started today and enter our developer competition.
>     http://sdm.link/oxford
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Making one app the root context

Dannes Wessels-3
I expect so because it contains a config file that binds / to the portal app, right?

Regards

Dannes

--
www.exist-db.org

> On 8 Mar 2017, at 20:19, Martin Holmes <[hidden email]> wrote:
>
> I was forgetting to deal with that portal thing. Deleting the whole
> portal folder seems to solve it.

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open