Dubbo http protocol is base on HTTP form and Spring’s HttpInvoker
configure http protocol:
<dubbo:protocol name="http" port="8080" />
configure Jetty Server (default):
<dubbo:protocol ... server="jetty" />
configure Servlet Bridge Server (recommend):
<dubbo:protocol ... server="servlet" />
configure DispatcherServlet:
<servlet>
<servlet-name>dubbo</servlet-name>
<servlet-class>org.apache.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dubbo</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Note that if you use servlets to dispatch requests:
<dubbo:protocol port="8080" />
must same as servlet container’s.<dubbo:protocol contextpath="foo" />
must same as servlet application’s.Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.