Communication between two web application in same server

后端 未结 5 1793
攒了一身酷
攒了一身酷 2020-12-09 10:41

All,

I have 2 web applications, Web1 and Web2, deployed on my tomcat server. I want classes in Web1 to call methods on classes in Web2. One way to do this is using

5条回答
  •  情深已故
    2020-12-09 11:22

    Just searched around some articles and the above scenario is certainly possible using CrossContext switching in Tomcat.

    Set the following element in context.xml in

    And then getServletContext().getContext("/Web2");.

    Haven't tried yet, though.

提交回复
热议问题