hi what is a servletContext()? if i run tomcat then all the servlets that r run from that tomcat instance is said to be in one servletContext(). right? then what is meant when we say we want to have communication b/w two servletContexts??? two tomcats r running on the same machine or different machines? regards maulin.
if i run tomcat then all the servlets that r run from that tomcat instance is said to be in one servletContext(). right?
errrrr.......wrong. A ServletContext is the context in which a given servlet is running. This will be your web-application. In other words, ServletContext is the application in which a servlet is available. When you say communication between two ServletContexts, its like communicating between two web applications. I have never done this, but theoritically speaking this is possible. So, ONE Tomcat running on a machine allowing different applications available, to exchange data (communicating). regds. - satya
rephasing Satya's words.. Every App. server can have multiple web-applications. Each web application will have one servlet context under wihch all the servlets of the perticular applications will run. Each web app. is mapped to a logical path on the server. Servlets with in a web app. can communicate with each other using servlet context. For a detailed discussion read SRV.3 from servlet specification. hope this helps Vamsi