undertow multiple webservices url
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want something like this on my address. How I can bind servlet1, servlet2, servlet3 to localhost:8080 so I can have different url to call such as localhost:8080/servlet localhost:8080/servlet1 localhost:8080/servlet2 localhost:8080/servlet3 I have this code that only work for thw last url(servlet) added DeploymentInfo servletBuilder = deployment() .setClassLoader(ServletServer.class.getClassLoader()) .setContextPath(MYAPP) .setDeploymentName("test.war") .addServlets( servlet(servletName, x) .addInitParam("message", output) .addMapping("/"