cross-context

Communication between two web application in same server

随声附和 提交于 2019-11-28 07:37:36
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 webservice. Is there any other way similar to calling a method on class on same web application ?. Thanks. Yes. It is possible. It tried for same servlet container by using getServletContext().getContext() method. First you need to make changes in below file (Windows) C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\context.xml Set value of crossContext to true. context.xml <Context crossContext="true"> <!-- Default set

What does the crossContext attribute do in Tomcat? Does it enable session sharing?

旧城冷巷雨未停 提交于 2019-11-27 04:39:57
All I can find in the Tomcat 5.5 docs is: Set to true if you want calls within this application to ServletContext.getContext() to successfully return a request dispatcher for other web applications running on this virtual host. Set to false (the default) in security conscious environments, to make getContext() always return null. I've found some forum posts that comment that setting crossContext=true also enables sharing the session object between different web applications, but I'm not able to find any official docs stating this. Is there a relation between Servlet.getContext() and the

Communication between two web application in same server

倾然丶 夕夏残阳落幕 提交于 2019-11-27 02:11:58
问题 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 webservice. Is there any other way similar to calling a method on class on same web application ?. Thanks. 回答1: Yes. It is possible. It tried for same servlet container by using getServletContext().getContext() method. First you need to make changes in below file (Windows) C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf

What does the crossContext attribute do in Tomcat? Does it enable session sharing?

被刻印的时光 ゝ 提交于 2019-11-26 12:45:41
问题 All I can find in the Tomcat 5.5 docs is: Set to true if you want calls within this application to ServletContext.getContext() to successfully return a request dispatcher for other web applications running on this virtual host. Set to false (the default) in security conscious environments, to make getContext() always return null. I\'ve found some forum posts that comment that setting crossContext=true also enables sharing the session object between different web applications, but I\'m not