Karaf pax.web 2 Servlets 2 ports

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

Karaf pax.web 2 Servlets 2 ports

Paul Fraser
Hi,

https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-extended

has been offered as an example of serving on 2 ports, for example with the karaf jetty setup.

How and where are the port values set?

These examples are 3 years old, is there anything more recent (Karaf 4.2.6) and perhaps simpler ?

Paul Fraser



Reply | Threaded
Open this post in threaded view
|

Re: Karaf pax.web 2 Servlets 2 ports

jbonofre
Hi Paul,

You can take a look on:

http://blog.nanthrax.net/?p=352

You can setup two connector in jetty.xml and then bind a servlet to
vhost. It doesn't use whiteboard, but you can define the vhost as
service property.

I can also add a full example in Karaf if you think it makes sense.

Regards
JB

On 08/11/2019 09:43, Paul Fraser wrote:

> Hi,
>
> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-extended
>
>
> has been offered as an example of serving on 2 ports, for example with
> the karaf jetty setup.
>
> How and where are the port values set?
>
> These examples are 3 years old, is there anything more recent (Karaf
> 4.2.6) and perhaps simpler ?
>
> Paul Fraser
>
>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf pax.web 2 Servlets 2 ports

Paul Fraser
Hi JB,

As usual, thanks for your very fast reply.

A full example would be most valuable. I will try and work through the blog and will let you know
how I go.

Paul

On 8/11/2019 7:52 pm, Jean-Baptiste Onofré wrote:

> Hi Paul,
>
> You can take a look on:
>
> http://blog.nanthrax.net/?p=352
>
> You can setup two connector in jetty.xml and then bind a servlet to
> vhost. It doesn't use whiteboard, but you can define the vhost as
> service property.
>
> I can also add a full example in Karaf if you think it makes sense.
>
> Regards
> JB
>
> On 08/11/2019 09:43, Paul Fraser wrote:
>> Hi,
>>
>> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-extended
>>
>>
>> has been offered as an example of serving on 2 ports, for example with
>> the karaf jetty setup.
>>
>> How and where are the port values set?
>>
>> These examples are 3 years old, is there anything more recent (Karaf
>> 4.2.6) and perhaps simpler ?
>>
>> Paul Fraser
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Karaf pax.web 2 Servlets 2 ports

jbonofre
OK,

I created https://issues.apache.org/jira/browse/KARAF-6515
for the tracking.

Regards
JB

On 08/11/2019 10:08, Paul Fraser wrote:

> Hi JB,
>
> As usual, thanks for your very fast reply.
>
> A full example would be most valuable. I will try and work through the
> blog and will let you know how I go.
>
> Paul
>
> On 8/11/2019 7:52 pm, Jean-Baptiste Onofré wrote:
>> Hi Paul,
>>
>> You can take a look on:
>>
>> http://blog.nanthrax.net/?p=352
>>
>> You can setup two connector in jetty.xml and then bind a servlet to
>> vhost. It doesn't use whiteboard, but you can define the vhost as
>> service property.
>>
>> I can also add a full example in Karaf if you think it makes sense.
>>
>> Regards
>> JB
>>
>> On 08/11/2019 09:43, Paul Fraser wrote:
>>> Hi,
>>>
>>> https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-extended
>>>
>>>
>>>
>>> has been offered as an example of serving on 2 ports, for example with
>>> the karaf jetty setup.
>>>
>>> How and where are the port values set?
>>>
>>> These examples are 3 years old, is there anything more recent (Karaf
>>> 4.2.6) and perhaps simpler ?
>>>
>>> Paul Fraser
>>>
>>>
>>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf pax.web 2 Servlets 2 ports

maggu2810
Isn't this similar to this thread (at least after some comments):
https://lists.apache.org/thread.html/69182ee8feef88896f840efde48146053997119e820ef037853c1c9b@%3Cuser.karaf.apache.org%3E
You also referenced to http://blog.nanthrax.net/?p=352
My observations has been that it should work for "Web Bundles" and I
did not found (that time) a way to get it working for servlets.
Reply | Threaded
Open this post in threaded view
|

Re: Karaf pax.web 2 Servlets 2 ports

jbonofre
That's similar indeed.

Let's add a full example (and eventually improvement on Pax Web).

Regards
JB

On 08/11/2019 10:50, Markus Rathgeb wrote:
> Isn't this similar to this thread (at least after some comments):
> https://lists.apache.org/thread.html/69182ee8feef88896f840efde48146053997119e820ef037853c1c9b@%3Cuser.karaf.apache.org%3E
> You also referenced to http://blog.nanthrax.net/?p=352
> My observations has been that it should work for "Web Bundles" and I
> did not found (that time) a way to get it working for servlets.
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com