You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by rysiek <ry...@menel.com> on 2010/12/21 09:31:34 UTC

Virtual Host (Geronimo 2.2 + Jetty)

Hello,

I'm using Geronimo 2.2 with Jetty and I want to make virtual hosts.
I read documentation which says that I have to add:
https://cwiki.apache.org/GMOxDOC22/configuring-virtual-host-in-jetty.html
<virtual-host>virtualhost1.com</virtual-host>

But the file I have, which was generated with Eclipse is not in this format.
The file is:

<?xml version="1.0" encoding="UTF-8"?> 
<web:web-app
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 
xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"> 
        <dep:environment> 
                <dep:moduleId> 
                        ...
                </dep:moduleId> 
                <dep:dependencies> 
                        ....
                </dep:dependencies> 
        </dep:environment> 
        <web:context-root>/GetnStarted3AG</web:context-root> 
</web:web-app>


There is no "<context-root>", but "<web:context-root>". I have tried
"<web:host>", "<web:virtual-host>", but it is not defined in this format.

What should I do to use virtual hosts?

Thanks,
Rysiek

-- 
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Virtual-Host-Geronimo-2-2-Jetty-tp2124909p2124909.html
Sent from the Users mailing list archive at Nabble.com.

Re: Virtual Host (Geronimo 2.2 + Jetty)

Posted by Kevan Miller <ke...@gmail.com>.
On Dec 21, 2010, at 6:05 AM, dsh wrote:

> Do you think this qualifies for a GEP enhancement JIRA. I mean could
> the GEP be able to figure out whether either Jetty or Tomcat is used
> and thus generate the correct XMLNS et al. markup?

Debatable... I think I prefer the generic namespace. We could generate an instructional comment or make it easier to switch to a specific namespace, if needed... Other opinions welcome...

--kevan

Re: Virtual Host (Geronimo 2.2 + Jetty)

Posted by dsh <da...@googlemail.com>.
Do you think this qualifies for a GEP enhancement JIRA. I mean could
the GEP be able to figure out whether either Jetty or Tomcat is used
and thus generate the correct XMLNS et al. markup?

Cheers
Daniel

On Tue, Dec 21, 2010 at 9:51 AM, David Jencks <da...@yahoo.com> wrote:
>> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1
>
> is the namespace for a geronimo web plan that works with either jetty or tomcat.  This way of specifying virtual hosts is jetty specific.  Try using
>
> http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2
>
> thanks
> david jencks
>
> On Dec 21, 2010, at 12:31 AM, rysiek wrote:
>
>>
>> Hello,
>>
>> I'm using Geronimo 2.2 with Jetty and I want to make virtual hosts.
>> I read documentation which says that I have to add:
>> https://cwiki.apache.org/GMOxDOC22/configuring-virtual-host-in-jetty.html
>> <virtual-host>virtualhost1.com</virtual-host>
>>
>> But the file I have, which was generated with Eclipse is not in this format.
>> The file is:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web:web-app
>> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
>> xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
>> xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
>> xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
>> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
>> xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
>> xmlns:pers="http://java.sun.com/xml/ns/persistence"
>> xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
>> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
>> xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
>>        <dep:environment>
>>                <dep:moduleId>
>>                        ...
>>                </dep:moduleId>
>>                <dep:dependencies>
>>                        ....
>>                </dep:dependencies>
>>        </dep:environment>
>>        <web:context-root>/GetnStarted3AG</web:context-root>
>> </web:web-app>
>>
>>
>> There is no "<context-root>", but "<web:context-root>". I have tried
>> "<web:host>", "<web:virtual-host>", but it is not defined in this format.
>>
>> What should I do to use virtual hosts?
>>
>> Thanks,
>> Rysiek
>>
>> --
>> View this message in context: http://apache-geronimo.328035.n3.nabble.com/Virtual-Host-Geronimo-2-2-Jetty-tp2124909p2124909.html
>> Sent from the Users mailing list archive at Nabble.com.
>
>

Re: Virtual Host (Geronimo 2.2 + Jetty)

Posted by David Jencks <da...@yahoo.com>.
> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1

is the namespace for a geronimo web plan that works with either jetty or tomcat.  This way of specifying virtual hosts is jetty specific.  Try using 

http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2

thanks
david jencks

On Dec 21, 2010, at 12:31 AM, rysiek wrote:

> 
> Hello,
> 
> I'm using Geronimo 2.2 with Jetty and I want to make virtual hosts.
> I read documentation which says that I have to add:
> https://cwiki.apache.org/GMOxDOC22/configuring-virtual-host-in-jetty.html
> <virtual-host>virtualhost1.com</virtual-host>
> 
> But the file I have, which was generated with Eclipse is not in this format.
> The file is:
> 
> <?xml version="1.0" encoding="UTF-8"?> 
> <web:web-app
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
> xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
> xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
> xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 
> xmlns:pers="http://java.sun.com/xml/ns/persistence"
> xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"> 
>        <dep:environment> 
>                <dep:moduleId> 
>                        ...
>                </dep:moduleId> 
>                <dep:dependencies> 
>                        ....
>                </dep:dependencies> 
>        </dep:environment> 
>        <web:context-root>/GetnStarted3AG</web:context-root> 
> </web:web-app>
> 
> 
> There is no "<context-root>", but "<web:context-root>". I have tried
> "<web:host>", "<web:virtual-host>", but it is not defined in this format.
> 
> What should I do to use virtual hosts?
> 
> Thanks,
> Rysiek
> 
> -- 
> View this message in context: http://apache-geronimo.328035.n3.nabble.com/Virtual-Host-Geronimo-2-2-Jetty-tp2124909p2124909.html
> Sent from the Users mailing list archive at Nabble.com.