Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread Jean-Baptiste Onofré
Hi Duan, Karaf doesn't gave up Spring, it's still available. In your bundle, you can still use Spring MVC DispatcherServlet, wiring, etc. Spring DM is also still available but you have to use old Spring version: it's not due to Karaf, it's Spring that doesn't maintain Spring DM anymore. So, my

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread duan2ping
Hi JB Because karaf gave up Spring, I can only use Servlet to develop web applications in OSGi. So, I need to do a lot of work to implement a wrapper similar to the SpringMVC framework. Is there any other good advice, or can subsequent versions of Karaf provide a framework that can replace

propertyFileEdits notes

2019-11-08 Thread Christian Lutz
Hello, I tried to set set the serviceRequirements=disable with the karaf-maven-plugin. As mentioned here (http://karaf.922171.n3.nabble.com/How-do-i-change-a-single-line-in-a-custom-distro-file-td4053462.html) I am able todo this with the assembly-property-edits.xml file. Three points to

Re: Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread Jean-Baptiste Onofré
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): >

Re: Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread Markus Rathgeb
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

Re: Aries jax-rs whiteboard

2019-11-08 Thread Tim Ward
Hi, Yes, you can absolutely inject things using @Context (this is the only way to do server sent events, so it’s not optional for any implementation). It’s recommended that you inject into resource methods, rather than into fields, unless you make your service prototype scope. This is to avoid

Re: Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread Jean-Baptiste Onofré
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

Re: Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread 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

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread Jean-Baptiste Onofré
Hi, I compared spring and blueprint. I don't know enough SpringMVC to compare. Anyway, SpringMVC is one think Spring DM is nother one. You also have the Spring extender in blueprint, so, it should be possible. About the servlet, yes, you can deploy a servlet in different ways. You have examples

Re: Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread Jean-Baptiste Onofré
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

Re: Using SpringMVC in Karaf 4.2.6

2019-11-08 Thread duan2ping
Hi JB I tried to check out some information about using Blueprint, but there is nothing to gain. If use blueprint and scr instead of spring, does web application development have a similar alternative to springmvc? Or can you only use the original servlet method like the one below?

Karaf pax.web 2 Servlets 2 ports

2019-11-08 Thread 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