Want to know the Difference between servletcontainer.init(webconfig) vs servletcontainer.init() vs servletcontainer.init(filterconfig) in prespective of pax web whiteboard in karaf OSGI
pls someone explain this.
Want to know the Difference between servletcontainer.init(webconfig) vs servletcontainer.init() vs servletcontainer.init(filterconfig) in prespective of pax web whiteboard in karaf OSGI
pls someone explain this.
servletcontainer
may mean anything in your question.
Servlet API specification defines these init()
methods:
javax.servlet.Servlet#init(javax.servlet.ServletConfig config)
javax.servlet.GenericServlet#init()
(no arguments)javax.servlet.Filter#init(javax.servlet.FilterConfig config)
So you should look for explanation directly in Servlet specification. (Mind that I link to javax
version of the specification. Currently the specification moved to Jakarta Servlet).
Pax Web is an implementation of web-related specifications from OSGi CMPN R8 and the above methods are simply handled according to both Servlet API and OSGi CMPN (in that order).
You can find more info and the way to configure the web container in the Apache Karaf Container 4.x - Documentation and also see this example: Apache Karaf Servlet examples